user warning: Unknown column 'og.description'

idcm - August 21, 2009 - 18:35
Project:lm_paypal
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I posted this issue on OG but was wondering if it really belongs here. http://drupal.org/node/555994

Sorry if this creates a duplicate but I am not sure who to bring this to.

Either way, can someone help please?

user warning: Unknown column 'og.description' in 'field list' query: SELECT DISTINCT(og.nid), n.title, r.body, n.uid, u.name, og.description FROM og og INNER JOIN node n ON og.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON n.uid = u.uid WHERE og.directory=1 AND n.status=1 AND og.selective = 2 ORDER BY og.nid DESC in /home/april22/public_html/beta2/sites/all/modules/lm_paypal/lm_paypal_subscriptions.module on line 1402.

#1

SomebodySysop - August 22, 2009 - 17:17
Status:active» needs review

Getting same exact error:

Organic groups 6.x-1.3

This is the layout for the og table:

og

Key: 1 PRIMARY

# nid: int, 11
# og_selective: int, 11
# og_description: varchar, 255
# og_theme: varchar, 255
# website: varchar, 255
# og_register: tinyint, 4
# og_directory: tinyint, 4
# notification: int, 1
# og_language: varchar, 12
# og_private: tinyint, 4

So, it appears that we need to change this code n lm_paypal_subscriptions.module on line 1402:
lm_paypal_subscriptions.module:  $sql = db_rewrite_sql("SELECT og.nid, n.title, r.body, n.uid, u.name, og.description FROM {og} og INNER JOIN {node} n ON og.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON n.uid = u.uid WHERE og.directory=1 AND n.status=1 AND og.selective = 2 ORDER BY og.nid DESC", 'og', 'nid');

to
lm_paypal_subscriptions.module:  $sql = db_rewrite_sql("SELECT og.nid, n.title, r.body, n.uid, u.name, og.og_description FROM {og} og INNER JOIN {node} n ON og.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON n.uid = u.uid WHERE og.og_directory=1 AND n.status=1 AND og.og_selective = 2 ORDER BY og.nid DESC", 'og', 'nid');

#2

idcm - August 22, 2009 - 21:47

Thanks, this is great. I was thinking I might need to update to OG 2.0. You wouldn't happen to know if OG 2.0 resolves the issue?

#3

djudd - September 18, 2009 - 03:34

I upgraded to OG 2.0 to check it out, and still got this issue. I did apply the fix in #1 and it appears to have solved the problem.

 
 

Drupal is a registered trademark of Dries Buytaert.