Search and advanced search produces SQL fail

More
11 years 6 months ago #36765 by steencnops
try to search at www.legekonsulenterne.dk
for files named "test"

and the same as you are logged in with
user: ......
passw: ......

Then you will se this:

**************
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 ty.access <= AND i.access <= AND i.id IN ( SELECT item_id FROM jos_flexi' at line 1 SQL=SELECT i.id, i.title AS title, i.sectionid, i.created, i.id AS fc_item_id, ie.search_index AS text, CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(':', i.id, i.alias) ELSE i.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as categoryslug, CONCAT_WS( " / ", 'Content', c.title, i.title ) AS section FROM jos_content AS i JOIN jos_categories AS c ON c.id = i.catid JOIN jos_flexicontent_items_ext AS ie ON ie.item_id = i.id JOIN jos_flexicontent_types AS ty ON ie.type_id = ty.id WHERE 1 AND i.state IN (1,-5-1) AND c.published = 1 AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= UTC_TIMESTAMP() ) AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= UTC_TIMESTAMP() ) AND c.access <= AND ty.access <= AND i.access <= AND i.id IN ( SELECT item_id FROM jos_flexicontent_items_ext WHERE MATCH (search_index) AGAINST ('+test*' IN BOOLEAN MODE) ) GROUP BY i.id ORDER BY i.title ASC LIMIT 0, 50

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #36792 by ggppdk
Hello
bug exists in v2.0.2 for J1.5 with no FLEXI_ACCESS

-- to patch edit file:
plugin/search/flexiadvsearch.php

replace:
Code:
$andaccess .= ' AND c.access <= '.$gid; $andaccess .= ' AND ty.access <= '.$gid; $andaccess .= ' AND i.access <= '.$gid;

with:
Code:
$aid = (int) $user->get('aid'); $andaccess .= ' AND c.access <= '.$aid; $andaccess .= ' AND ty.access <= '.$aid; $andaccess .= ' AND i.access <= '.$aid;


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.647 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline