Missing table prefix in SQL query for organic groups

FinTrader - February 22, 2009 - 10:18
Project:Menu Trails
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

user warning: Table 'v305.og' doesn't exist query: SELECT n.nid, n.title FROM test_node n INNER JOIN og ON n.nid = og.nid ORDER BY n.title in /home/apache2/test/http/sites/all/modules/menutrails/menutrails.module on line 316.

It seems that the table prefix "test_" is missing in this query. The correct table name should be "test_og" instead of "og"

#1

FinTrader - February 22, 2009 - 10:32

Fixed query in line 316:
$result = db_query('SELECT n.nid, n.title FROM {node} n INNER JOIN {og} ON n.nid = {og}.nid ORDER BY n.title');

#2

crischan - March 7, 2009 - 13:01

Here's the patch for it.

AttachmentSize
menutrails.module.patch 742 bytes

#3

sun - July 24, 2009 - 14:58
Status:active» fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

#4

System Message - August 7, 2009 - 15:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.