Closed (fixed)
Project:
Content Management Filter
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 May 2009 at 02:54 UTC
Updated:
20 Jul 2009 at 14:10 UTC
user warning: The used SELECT statements have a different number of columns query: SELECT COUNT(*) FROM drupal_node n INNER JOIN drupal_users u ON n.uid = u.uid AND u.uid = 1 UNION SELECT c.cid, c.nid, c.subject AS title, c.comment, n.type, u.name AS username, u.uid, c.status, c.timestamp AS created, 0 AS changed FROM drupal_comments c INNER JOIN drupal_node n ON c.nid = n.nid INNER JOIN drupal_users u ON u.uid = c.uid AND u.uid = 1
in return pager_query
line: isset($_SESSION['cmf_max_rows']) ? $_SESSION['cmf_max_rows'] : 50, 0, NULL, $args);
Comments
Comment #1
jannalexx commentedresults are ok but:
user warning: The used SELECT statements have a different number of columns query: SELECT COUNT(*) FROM drupal_node n INNER JOIN drupal_users u ON n.uid = u.uid AND u.uid = 1 UNION SELECT c.cid, c.nid, c.subject AS title, c.comment, n.type, u.name AS username, u.uid, c.status, c.timestamp AS created, 0 AS changed FROM drupal_comments c INNER JOIN drupal_node n ON c.nid = n.nid INNER JOIN drupal_users u ON u.uid = c.uid AND u.uid = 1 in /.../sites/all/modules/cmf/cmf.module on line 498.
Comment #2
nancydruYou are going to have to provide a count query. This seems to do the trick:
And, of course, the pager_query needs to specify this.
Comment #3
nancydruComment #4
nancydruSee patch in #517880: Coding standards
Comment #5
nancydruCommitted to both -dev versions.
Comment #6
nancydruIncluded in new release.