Hi I had this after uploading an audio file.
--- klip ---
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT * FROM playlist_relate LEFT JOIN i18n_node i18n ON n.nid = i18n.nid WHERE (i18n.language ='en' OR i18n.language ='' OR i18n.language IS NULL) AND parent_id = '251' AND child_id = '' in /home/includes/database.mysql.inc on line 120.
--- / klip ---
Help and a fast fix is highly appreciated.
Roland
Comments
Comment #1
jose reyero commentedI think this is a bug in playlist module that doesn't follow standard guidelines with 'db_rewrite_sql_function'
There's some code like:
db_rewrite_sql('SELECT * FROM {playlist_relate} WHERE '.$cond)
Actually, db_rewrite_sql should not be used here, as this table seems not to be node related, is it?
This may cause other modules, like i18n in this case, to do the wrong query rewrite, causing sql errors.
Comment #2
zirafa commentedHi, I think Jose may be correct. It needs to be patched with db_query most likely.
Comment #3
zirafa commentedHi, I've eliminated the db_rewrite_sql error that may have been causing problems. Please try an updated CVS or 4.7 download in a few and let me know if there are problems.
Comment #4
scriptnews commentedHi Zirafa
Now the CVS works well so far. The error seems to have disappeared.
Many Thanks
Roland
Comment #5
zirafa commentedGreat! Marking this fixed.
Comment #6
(not verified) commented