Unknown column 'node.nid .. Bio module?

RaRi - March 26, 2008 - 09:41

I got this error by running Drupal v5.7 and Bio module:

Unknown column 'node.nid' in 'field list' query: SELECT node.nid, uid FROM _opm_node WHERE node.changed > 0 AND node.type = "bio" in /includes/database.mysql.inc on line 172.

Any other information needed?

Looks like you are using a

AjK - March 26, 2008 - 11:20

Looks like you are using a database table prefix "_opm_" but you believe the Bio module has a bug that doesn't play nice.

However, having looking in the Bio module I can't see this query. Since it's a query to select that node type it could be in any module so you'd need to priovide a list of modules you are using.

The bug is simple to fix, once you find which module is responsible for the error.

ok .. lets find us the module ..

RaRi - March 28, 2008 - 18:21

Yes, the prefix is _opm_.
The modules I am using are:

[login_redirect] [taxonomy]
[loginmenu] [taxonomy_access]
[matchapi] [taxonomy_block]
[aggregator] [menu] [taxonomy_manager]
[answers] [mimemail] [taxonomy_menu]
[bio] [node] [taxonomy_quick_find]
[block] [nodefamily] [taxonomy_ticker]
[blog] [nodeprofile] [taxonomysearch]
[blogapi] [panels] [throttle]
[book] [path] [tinymce]
[captcha] [pathauto] [tinytax]
[click2bookmark] [pdfview] [token]
[color] [ping] [tracker]
[comment] [poll] [troll]
[contact] [poormanscron] [upload]
[directory] [privatemsg] [upload_progress]
[drupal] [profile] [urlicon]
[extlink] [related_subform] [user]
[faq] [relatedcontent] [user_list]
[filter] [relativity] [user_register_notify]
[forum] [search] [user_stats]
[greybox] [site_user_list] [user_titles]
[help] [sitemenu] [usermatch]
[imce] [spam] [views]
[interests] [statistics] [views_fusion]
[invite] [subform_element] [watchdog]
[legacy] [system]
[locale] [tagadelic]

Sure that this list helps? mmhh

Matchapi module .. maybe not playing nice?

RaRi - March 28, 2008 - 18:27

After your hint I tried to find the statement and found something in the matchapi module:

$query = db_query('SELECT node.nid%s FROM {node} WHERE node.changed > %d AND node.type = "%s"', $select, $last_run, $type);

Guess this is the problematic part - but how to change now?

change the sql

cpforbes - March 31, 2008 - 18:06

The sql needs an alias for the table name

$query = db_query('SELECT node.nid%s FROM {node} n WHERE n.changed > %d AND n.type = "%s"', $select, $last_run, $type);

$select and $last_run may need to have "node" replaced with "n"

I would speculate that this is a problem with many queries in the matchapi module. I guess you should report a bug on the matchapi module.

Thanks .. I will try your

RaRi - April 3, 2008 - 08:03

Thanks .. I will try your change as soon as I get home from work *g

By the way, I did report the bug at http://drupal.org/node/240865

 
 

Drupal is a registered trademark of Dries Buytaert.