Hi all,

thanks for a great module. I have found a problem with the node-revision views. To reproduce create a new view of the type node revisions. Add any field (like node title). Add the argument Taxonomy:Parent Term. Test the view with any Term ID as argument. This produces a sql error on my setup.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 1080 LIMIT 0, 10' at line 6 query: SELECT node_revisions.vid AS vid, node.title AS node_title, node.nid AS node_nid FROM node_revisions node_revisions LEFT JOIN node node ON node_revisions.nid = node.nid WHERE .parent = 1080 LIMIT 0, 10 in /var/www-dev/drupal/sites/all/modules/content/views/includes/view.inc on line 771.

Node views seem to work fine with this argument.

Dave

Comments

dawehner’s picture

I can reproduce this


$view = new view;
$view->name = 'test1231';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node_revisions';
$view->is_cacheable = FALSE;
$view->api_version = 3.0-alpha1;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Argument: Taxonomy: Parent term */
$handler->display->display_options['arguments']['parent_1']['id'] = 'parent_1';
$handler->display->display_options['arguments']['parent_1']['table'] = 'term_hierarchy';
$handler->display->display_options['arguments']['parent_1']['field'] = 'parent';
$handler->display->display_options['arguments']['parent_1']['default_action'] = 'default';
$handler->display->display_options['arguments']['parent_1']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['parent_1']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['parent_1']['default_argument_options']['argument'] = '1';
$handler->display->display_options['arguments']['parent_1']['break_phrase'] = 0;
$handler->display->display_options['arguments']['parent_1']['not'] = 0;
dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Sadly no responce, as always.

The issue has to be reproducable, if not this can't be fixed.

huesforalice’s picture

Well it is reproducable isn't it?

dawehner’s picture

Status: Postponed (maintainer needs more info) » Active

Oh i realize some inconsistence and i dissolve in a logic cloud :)

I think i was on the wrong window.

srobert72’s picture

Same error

Letharion’s picture

Assigned: Unassigned » Letharion
Letharion’s picture

Confirmed

dawehner’s picture

But this view works


$view = new view;
$view->name = 'test1231';
$view->description = '';
$view->tag = '';
$view->base_table = 'node_revisions';
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Relationship: Taxonomy: Parent term */
$handler->display->display_options['relationships']['parent']['id'] = 'parent';
$handler->display->display_options['relationships']['parent']['table'] = 'term_hierarchy';
$handler->display->display_options['relationships']['parent']['field'] = 'parent';
$handler->display->display_options['relationships']['parent']['required'] = 0;
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Argument: Taxonomy: Term ID */
$handler->display->display_options['arguments']['tid']['id'] = 'tid';
$handler->display->display_options['arguments']['tid']['table'] = 'term_data';
$handler->display->display_options['arguments']['tid']['field'] = 'tid';
$handler->display->display_options['arguments']['tid']['relationship'] = 'parent';
$handler->display->display_options['arguments']['tid']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['tid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['tid']['break_phrase'] = 0;
$handler->display->display_options['arguments']['tid']['not'] = 0;
iamjon’s picture

Status: Active » Closed (fixed)

huesforalice,
did dereine's post work?
feel free to reopen the issue if it is still active.

closing from lack of activity.