By Print and Web Designer on Thursday, 09 October 2014
Posted in Technical Issues
Replies 7
Likes 0
Views 548
Votes 0
Folks,

After updating the site, the homepage displayed an error. After digging deeper, the error source was found to be an SQL query originating from within the mod_latestblogs module. I verified that EasyBlog, mod_latestblogs, etc. were all at the latest version.

Joomla: 3.3.6
EasyBlog: 3.9.18613
mod_latestblogs: 3.9.2

Error message thrown to console:
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 ') AND a.`issitewide` = '1' AND a.`category_id` IN('6','2','3','5','') ORDER BY ' at line 1 SQL=SELECT a.`id` AS key1, a.*, b.`id` as key2, b.`title` as `category` FROM `ewmn_easyblog_post` AS a LEFT JOIN `ewmn_easyblog_category` AS b ON a.category_id = b.id WHERE a.`published` = 1 AND a.`ispending` = '0' AND a.`private` = '0' AND a.`category_id` IN (6,2,3,5,) AND a.`issitewide` = '1' AND a.`category_id` IN('6','2','3','5','') ORDER BY a.`created` desc LIMIT 2

Disabling mod_latestblogs returns site to a functional state. Re-enabling mod_latestblogs reliably causes the SQL error.

Site is also running Rocket Theme Paradigm Template v1.2 and Gantry v4.1.25.

I appreciate any help that you can offer.

Regards,
chrissy
Hello Myra,

Can you provide us your backend and FTP access so we can have a better look on your issue here and immediately fix this for you? Please advise.
·
Thursday, 09 October 2014 10:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Nick,

I have included the site access information. You will have to go into the modules and enable mod_latestblogs ("EasyBlog Latest Blogs"), clear your browser cache, and reload to see the error occur.

Regards,
chrissy
·
Friday, 10 October 2014 08:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Myra,

I've fixed it for you. Please have a look.
·
Friday, 10 October 2014 10:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Could you please let me know what you did as I need to copy it to the production site.

Thanks,
chrissy
·
Friday, 10 October 2014 21:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Myra Ray,

Sorry for late reply to this,
Try copy this file from your test site -> JoomlaFolder/modules/mod_latestblogs/helper.php
Hope this help.
·
Saturday, 11 October 2014 01:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is the change that was made.

--- helper.php.orig	2014-10-13 16:16:47.212803840 -0400
+++ helper.php 2014-10-13 16:14:57.447513194 -0400
@@ -118,7 +118,7 @@
}
}

- $catIds = array_unique( $catIds );
+ //$catIds = array_unique( $catIds );
}

$cid = $catIds;
·
Tuesday, 14 October 2014 04:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Myra,

Yes, it is.
·
Tuesday, 14 October 2014 10:08
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post