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

jose reyero’s picture

Project: Internationalization » Playlist (toolkit, modules)

I 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.

zirafa’s picture

Hi, I think Jose may be correct. It needs to be patched with db_query most likely.

zirafa’s picture

Hi, 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.

scriptnews’s picture

Hi Zirafa

Now the CVS works well so far. The error seems to have disappeared.

Many Thanks

Roland

zirafa’s picture

Status: Active » Fixed

Great! Marking this fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)