Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)
Comment | File | Size | Author |
---|---|---|---|
#2 | ctools-node_revision_typo-2026655-2.patch | 574 bytes | AndreyMaximov |
#1 | ctools-node_revision_typo-2026655-1.patch | 574 bytes | AndreyMaximov |
Screen shot 2013-06-24 at 12.21.22 PM.png | 56.39 KB | AndreyMaximov |
Comments
Comment #1
AndreyMaximov CreditAttribution: AndreyMaximov commentedComment #2
AndreyMaximov CreditAttribution: AndreyMaximov commentedSorry for double postin
Comment #3
maximpodorov CreditAttribution: maximpodorov commentedThe simple fix.
Comment #4
andypostThis could lead to data-loss
Comment #5
podaroklooks like simple fix
do we need tests here?
if no - RTBC
Comment #6
kolier CreditAttribution: kolier commentedPlease commit before 7.x-1.4.
Comment #7
japerryFixed and Committed:
http://drupalcode.org/project/ctools.git/commit/c5205c194a935ab646d07ed9...