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

CommentFileSizeAuthor
#4 PDO_ambiguous_status-1150026-3.patch965 bytesaparimana

Comments

betarobot’s picture

Did you use it just with core translation module or i18n? Could you describe your situation better?

daniorama’s picture

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

betarobot’s picture

Title: Not working » PDOException: SQLSTATE[23000]: Integrity constraint violation
Status: Active » Closed (cannot reproduce)

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

aparimana’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new965 bytes

Hi,

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!

betarobot’s picture

Assigned: Unassigned » betarobot
Status: Needs review » Closed (fixed)

Great! Thanks for patch Julian. Committed to alpha3.