Hello!

I'm using node revision argument (Revision: ID) in Page Manager and there are exceptions:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.node_revisions' doesn't exist: SELECT nid FROM {node_revisions} WHERE vid = :vid; Array ( [:vid] => 1874 ) in ctools_argument_rid_context() (line 42 of .../sites/all/modules/ctools/plugins/arguments/rid.inc).

plugins/arguments/rid.inc:42

$nid = db_query('SELECT nid FROM {node_revisions} WHERE vid = :vid', array(':vid' => $arg))->fetchField();

should be

$nid = db_query('SELECT nid FROM {node_revision} WHERE vid = :vid', array(':vid' => $arg))->fetchField();

Correct table name is node_revision (without s)

Screen shot 2013-06-24 at 12.21.22 PM.png

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AndreyMaximov’s picture

Status: Active » Needs review
FileSize
574 bytes
AndreyMaximov’s picture

Sorry for double postin

maximpodorov’s picture

Status: Needs review » Reviewed & tested by the community

The simple fix.

andypost’s picture

Priority: Normal » Critical

This could lead to data-loss

podarok’s picture

Assigned: Unassigned » merlinofchaos

looks like simple fix
do we need tests here?
if no - RTBC

kolier’s picture

Please commit before 7.x-1.4.

japerry’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.