Hey mate I notice your use of db_rewrite_sql does not specify all the arguments as instructed by the api. By using it without the extra argument it will only truly work on the {node} table (that's why nodereference doesn't use the extra arguments). I had the same problems with my module. No symptoms will appear until you try to install a module like i18n internationalization (language module) and it will try to rewrite your queries on the {comments} table using column 'nid' thinking that it is the {node} table - which will cause errors.

Comments

swentel’s picture

Hmm good point, I'll fix that this week!

swentel’s picture

Status: Active » Fixed

fixed in D5 & D6 branch, thanks for the report!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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