- Posts: 62
COMMUNITY FORUM
Bug in the search plugin
- Ivo Apostolov
-
Topic Author
- Offline
- Senior Member
illegal if there is no GROUP BY clause SQL=SELECT COUNT(id) as counter,
userName, userID, commentEmail FROM jos_k2_comments WHERE userID > 0
AND published = 1 LIMIT 0, 5Using MySQLi
MySQL 5.0.45PHP 5.2.6Apache/2.2.3 (CentOS)When debug is turned off, the search does not return any results.
Please Log in or Create an account to join the conversation.
- Fernando P
-
- Offline
- New Member
- Posts: 2
No k2 results on normal mode, and this errorwith debug ON
JDatabaseMySQL::query: 1210 - Incorrect arguments to MATCH SQL=SELECT i.title AS title, i.metadesc, i.metakey, c.name as section, i.image_caption, i.image_credits, i.video_caption, i.video_credits, i.extra_fields_search, tags.name as tag, i.created, CONCAT(i.introtext, i.fulltext) 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 catslug FROM jos_k2_items AS i INNER JOIN jos_k2_categories AS c ON c.id=i.catid AND c.access <= 18 LEFT JOIN jos_k2_tags_xref tags_xref ON tags_xref.itemID = i.id LEFT JOIN jos_k2_tags tags ON tags.id = tags_xref.tagID WHERE MATCH(i.title, i.introtext, i.`fulltext`,tags.name,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('clara') AND i.trash = 0 AND i.published = 1 AND i.access <= 1 AND c.published = 1 AND c.access <= 1 AND c.trash = 0 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50
Please Log in or Create an account to join the conversation.
- Fernando P
-
- Offline
- New Member
- Posts: 2
Joomla 1.5.15
MySQL 5.1.30
PHP 5.2.9
Apache 2.2.11
Fernando P said:I'm having exactly the same problem. Any solutions yet?
No k2 results on normal mode, and this errorwith debug ON
JDatabaseMySQL::query: 1210 - Incorrect arguments to MATCH SQL=SELECT i.title AS title, i.metadesc, i.metakey, c.name as section, i.image_caption, i.image_credits, i.video_caption, i.video_credits, i.extra_fields_search, tags.name as tag, i.created, CONCAT(i.introtext, i.fulltext) 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 catslug FROM jos_k2_items AS i INNER JOIN jos_k2_categories AS c ON c.id=i.catid AND c.access <= 18 LEFT JOIN jos_k2_tags_xref tags_xref ON tags_xref.itemID = i.id LEFT JOIN jos_k2_tags tags ON tags.id = tags_xref.tagID WHERE MATCH(i.title, i.introtext, i.`fulltext`,tags.name,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('clara') AND i.trash = 0 AND i.published = 1 AND i.access <= 1 AND c.published = 1 AND c.access <= 1 AND c.trash = 0 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
My page: Project E-Store Part 2 has tags in it.
I then search using keywords such as part 2 and it finds the item.
It would also be great to know how to set the page correctly when no results are found.
For example a search at K2Koom.com for K2_content shows no result, but also not any header to say Search produced no results. Where can I modify that?
Thanks.
I then set searching in tags to NO.
Clear cache
Search the same words and the item is still displayed.
Seems to have no effect for me.
Please Log in or Create an account to join the conversation.
- John Christy valentine
-
- Offline
- New Member
- Posts: 2
Lefteris Kavadas said:Hi. OK found the bug. Go to K2 search plugin and set "Enable searching in tags" to "No". This way search will work again. This parameter will be removed from the plugin. Thank you all for reporting this issue to us.
Please Log in or Create an account to join the conversation.
- Pomba
-
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Pomba said:
At the K2 Search Plugin I can only find "Search Limit" (50) - no other parameters?
Please Log in or Create an account to join the conversation.
- Pomba
-
- Offline
- New Member
- Posts: 11
K2Joom said:Here is a screen shot of my K2 Search Plugin
Pomba said:
At the K2 Search Plugin I can only find "Search Limit" (50) - no other parameters?
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Pomba said:I find that very wierd. I have the exact same as your screenshot - minus the Tag-searching-opinion. =o
K2Joom said:Here is a screen shot of my K2 Search Plugin
Pomba said:
At the K2 Search Plugin I can only find "Search Limit" (50) - no other parameters?
Please Log in or Create an account to join the conversation.
- Pomba
-
- Offline
- New Member
- Posts: 11
Now I downloaded the fixed file for the Search plugin - code.google.com/p/joomlaworks/source/browse/trunk/K2/plugins/search/k2.php
Still it doesn't work. No results at all/any, with the following error-message:
Warning: Invalid argument supplied for foreach() in /home/xdxpnet/public_html/plugins/search/k2.php on line 131
Please Log in or Create an account to join the conversation.
- Swami Abhiramananda
-
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
cmath said:Lefteris, I have set Enable search in tags to NO, but still have the problem in search. What is the fix for this? Could you provide us the updated search file?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Ivo Apostolov
-
Topic Author
- Offline
- Senior Member
- Posts: 62
Please Log in or Create an account to join the conversation.
- Swami Abhiramananda
-
- Offline
- New Member
- Posts: 7
The following sql query is executed, but there are no errors on the page, although the search is not returning any results:
SELECT i.*, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories AS c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 2
AND i.trash = 0
AND c.published = 1
AND c.access <= 2
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2010-02-17 10:51:06' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2010-02-17 10:51:06' )
AND MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('ramakrishna')
ORDER BY i.id DESC
LIMIT 0, 10
SELECT COUNT(*)
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 2
AND i.trash = 0
AND c.published = 1
AND c.access <= 2
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2010-02-17 10:51:06' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2010-02-17 10:51:06' )
AND MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('ramakrishna')
Thanks,
Lefteris Kavadas said:Hi. Are you getting any error? Please enable debug mode and check the query ( or post it here....). cmath said:Lefteris, I have set Enable search in tags to NO, but still have the problem in search. What is the fix for this? Could you provide us the updated search file?
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
cmath said:Hi Lefteris, The following sql query is executed, but there are no errors on the page, although the search is not returning any results:
SELECT i.*, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories AS c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 2
AND i.trash = 0
AND c.published = 1
AND c.access <= 2
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2010-02-17 10:51:06' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2010-02-17 10:51:06' )
AND MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('ramakrishna')
ORDER BY i.id DESC
LIMIT 0, 10
SELECT COUNT(*)
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 2
AND i.trash = 0
AND c.published = 1
AND c.access <= 2
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2010-02-17 10:51:06' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2010-02-17 10:51:06' )
AND MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('ramakrishna')
Thanks,
Lefteris Kavadas said:Hi. Are you getting any error? Please enable debug mode and check the query ( or post it here....). cmath said:Lefteris, I have set Enable search in tags to NO, but still have the problem in search. What is the fix for this? Could you provide us the updated search file?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Swami Abhiramananda
-
- Offline
- New Member
- Posts: 7
Here is the link:
www.chennaimath.org/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=3&Itemid=703
Thanks,
Lefteris Kavadas said:Hi. The queries you posted are from the K2 component search not the K2 search plugin. The queries are fine. Maybe providing a link to your site will help us see what's wrong.
Please Log in or Create an account to join the conversation.
- Ivo Apostolov
-
Topic Author
- Offline
- Senior Member
- Posts: 62
code.google.com/p/joomlaworks/source/browse/#svn/trunk/K2
Larry said:i can not get the 2.2 search plugin to work...
could someone please post the k2.php code from version 2.1
Please Log in or Create an account to join the conversation.
- Swami Abhiramananda
-
- Offline
- New Member
- Posts: 7
Larry said:thank you Ivo, .. still get no output from K2 search....
if i switch to "clouds"... the tool works perfectly...
if i switch back to "search" mode...
and simply hit "enter" with a "blank search box"
then i get the entire dbase listing...
Please Log in or Create an account to join the conversation.
- GreenDome
-
- Offline
- Premium Member
- Posts: 93
cmath said:So, is K2 Search broken in K2 2.2? Are there any alternatives?
Larry said:thank you Ivo, .. still get no output from K2 search.... if i switch to "clouds"... the tool works perfectly...
if i switch back to "search" mode...
and simply hit "enter" with a "blank search box"
then i get the entire dbase listing...
Please Log in or Create an account to join the conversation.