I have a strange problem with a page that was working previous to the update to 2.5.3. I updated EE from 2.4.0 to 2.5.3. Everything appeared to be working fine, including the page in question. However, when I added a new channel field to the a channel the page shows a SQL error. I’ve tried to narrow it down and it appears to be originating from a search parametre.
I checked the bug tracker and did find one bug report referencing line 1148 of mod.channel.php, and tried the recommended fix but had no success.
I have since removed the channel field that I added to the channel and it is still not working.
Bug tracker recommended posting in the technical forum first and I’ve been searching but haven’t found anything referencing line 2736 of mod.channel.php. (error message below).
Anyway insight or help would be greatly appreciated. I do have a full backup so worse case, I’ll just revert back. This is a development site not yet in production, so I’m not in a panic over a live site.
Thanks in advance.
The error message is:
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 1' at line 2
SELECT t.entry_id FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1349123510 AND (t.expiration_date = 0 OR t.expiration_date > 1349123510) AND t.channel_id = '24' AND t.status = 'open' AND ( )ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 1
Filename: modules/channel/mod.channel.php
Line Number: 2736