When doing a simple exp:comment:entries tag with dynamic set to “no”, it causes a sql query error.
Removing the dynamic variable remedies the error but then breaks the page as it doesn’t return results (obviously).
The error is as such
Error Number: 1052
Column ‘comment_date’ in field list is ambiguousSELECT `comment_date`, `comment_id` FROM (`exp_comments` c, `exp_comments`) JOIN `exp_channel_titles` ct ON `ct`.`entry_id` = `c`.`entry_id` WHERE `c`.`status` = ‘o’ AND `c`.`channel_id` IN (‘9’, ‘5’) AND `ct`.`status` != ‘closed’ AND `c`.`site_id` IN (‘1’) AND (`ct`.`expiration_date` = 0 OR `ct`.`expiration_date` > 1315293869) ORDER BY `comment_date` desc LIMIT 15
Filename: modules/comment/mod.comment.php
Line Number: 475
The problem is in “(`exp_comments` c, `exp_comments`)”
The comments table is being called twice, which causes a duplication of the comment_date field and hence the error.
I’ve temporarily overcome this by keeping the comment module’s model from 2.2.2 but using the mcp, mod and upd files from version 2.1.1. This is not ideal however as I’m not certain wether this breaks other functionality or will cause other issues down the line.
There is clearly a bug in the new mod.comment.php file which needs to be corrected expediently.