By John Coonen on Monday, 02 November 2015
Posted in Technical Issues
Likes 0
Views 715
Votes 0
Hi StackIdeas,

My site is offline now, because it throws this error:

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.`lft` < and a.`published` = '1' AND (( ( a.`private` = 0) OR ( a.`private' at line 1 SQL=select a.`id`, a.`title`, a.`alias`, a.`private`, a.`parent_id` from `xxxxxx_easyblog_category` as a WHERE a.`lft` > AND a.`lft` < and a.`published` = '1' AND (( ( a.`private` = 0) OR ( a.`private` = 1 and 1 > 0) OR ( a.`private` = 2 and (select count(1) from `xxxxxx_easyblog_category_acl` where `category_id` = a.`id` and `acl_id` = 1 and `content_id` in (2,3,8,11)) > 0))) ORDER BY a.`lft` ASC

I used "xxxxxx" instead of my actual prefix for this public post. You should already have my site / ftp access info.
Hi John,

I am sorry for the delay of this reply.

Regarding your issue, I've added a fix on your site and now your EasyBlog is working correctly. Below is the file I've modified from your site.

JOOMLA/administrator/components/com_easyblog/models/categories.php at line 594 ~ 595:


$query .= ' WHERE a.`lft` > ' . $category->lft;
$query .= ' AND a.`lft` < ' . $category->rgt;


to:


$query .= ' WHERE a.`lft` > ' . $db->Quote($category->lft);
$query .= ' AND a.`lft` < ' . $db->Quot($category->rgt);


The same fix will be added into next release of EasyBlog as well

Hope this help and have a nice day!
Sam
·
Monday, 02 November 2015 12:09
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post