Hello, I received this error:
Notice: Undefined variable: nid en i18n_comments_num_new() (line 17 of /home/site/public_html/sites/all/modules/i18n_comments/i18n_comments.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created' in where clause is ambiguous: SELECT COUNT(cid) FROM {comment} c LEFT JOIN {node} n ON n.nid = c.nid WHERE n.tnid = :tnid AND created > :timestamp AND status = :status; Array ( [:tnid] => 145 [:timestamp] => 1302169988 [:status] => 1 ) en i18n_comments_num_new() (line 30 of /home/site/public_html/sites/all/modules/i18n_comments/i18n_comments.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | PDO_ambiguous_status-1150026-3.patch | 965 bytes | aparimana |
Comments
Comment #1
betarobot commentedDid you use it just with core translation module or i18n? Could you describe your situation better?
Comment #2
daniorama commentedHi betarobot, sorry about taking so long to answer, busy week. I'm using i18n, the last dev version. I installed both i18n and i18ncomments using drush. I had no issues with any other module or i18n but after installing yours the website crashed so I had to uninstall it.
Comment #3
betarobot commentedThanks for report, but could not reproduce it. There are a few other alike bug reports for other modules (including i18n and Views), so I'm not sure if it's exactly about i18n_comments.
If anybody spot it again and/or will have more information on this issue, please feel free to reopen this ticket.
Comment #4
aparimana commentedHi,
I reproduced this problem.
There were actually two ambiguous columns (found both in comments table and nodes table):
- created
- status
I have disambiguated them by explictly referencing the comments table in each case
Also, the variable $tnid was being passed, but $nid used to call
node_last_viewed($nid)
.... this is also fixed in the patch attached
Hope this helps!
Comment #5
betarobot commentedGreat! Thanks for patch Julian. Committed to alpha3.