Keyword

Bug in the search plugin

  • Ivo Apostolov
  • Ivo Apostolov's Avatar Topic Author
  • Offline
  • Senior Member
More
15 years 3 months ago #77553 by Ivo Apostolov
Bug in the search plugin was created by Ivo Apostolov
Try searching with the standard Joomla! search with debug ON.I am getting:500 - JDatabaseMySQL::query: 1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is
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.

More
15 years 2 months ago #77554 by Fernando P
Replied by Fernando P on topic Bug in the search plugin
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.

More
15 years 2 months ago #77555 by Fernando P
Replied by Fernando P on topic Bug in the search plugin
I'm using:

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.

More
15 years 2 months ago #77556 by Lefteris
Replied by Lefteris on topic Bug in the search plugin
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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
15 years 2 months ago #77557 by Simon Wells
Replied by Simon Wells on topic Bug in the search plugin
I ran a test at K2Joom.com with Enable searching in tags to YES.

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
  • John Christy valentine's Avatar
  • Offline
  • New Member
More
15 years 2 months ago #77558 by John Christy valentine
Replied by John Christy valentine on topic Bug in the search plugin
Hi, I want search plugin to work with "Enable searching in tags"

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.

More
15 years 2 months ago #77559 by Pomba
Replied by Pomba on topic Bug in the search plugin
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.

More
15 years 2 months ago #77560 by Simon Wells
Replied by Simon Wells on topic Bug in the search plugin
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.

More
15 years 2 months ago #77561 by Pomba
Replied by Pomba on topic Bug in the search plugin
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.

More
15 years 2 months ago #77562 by Simon Wells
Replied by Simon Wells on topic Bug in the search plugin
Which version of K2 are you running?

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.

More
15 years 2 months ago #77563 by Pomba
Replied by Pomba on topic Bug in the search plugin
Im using v 2.2.

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
  • Swami Abhiramananda's Avatar
  • Offline
  • New Member
More
15 years 2 months ago #77564 by Swami Abhiramananda
Replied by Swami Abhiramananda on topic Bug in the search plugin
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.

More
15 years 2 months ago #77565 by Lefteris
Replied by Lefteris on topic Bug in the search plugin
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.

  • Ivo Apostolov
  • Ivo Apostolov's Avatar Topic Author
  • Offline
  • Senior Member
More
15 years 2 months ago #77566 by Ivo Apostolov
Replied by Ivo Apostolov on topic Bug in the search plugin
Lefteris, the strange thing is that the plugin for 2.1 works out of the box

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

  • Swami Abhiramananda
  • Swami Abhiramananda's Avatar
  • Offline
  • New Member
More
15 years 2 months ago #77567 by Swami Abhiramananda
Replied by Swami Abhiramananda on topic Bug in the search plugin
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?

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

More
15 years 2 months ago #77568 by Lefteris
Replied by Lefteris on topic Bug in the search plugin
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.

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
  • Swami Abhiramananda's Avatar
  • Offline
  • New Member
More
15 years 2 months ago #77569 by Swami Abhiramananda
Replied by Swami Abhiramananda on topic Bug in the search plugin
Hi Lefteris,
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
  • Ivo Apostolov's Avatar Topic Author
  • Offline
  • Senior Member
More
15 years 2 months ago #77570 by Ivo Apostolov
Replied by Ivo Apostolov on topic Bug in the search plugin
They have it in Google Code

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
  • Swami Abhiramananda's Avatar
  • Offline
  • New Member
More
15 years 2 months ago #77571 by Swami Abhiramananda
Replied by Swami Abhiramananda on topic Bug in the search plugin
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.

More
15 years 2 months ago #77572 by GreenDome
Replied by GreenDome on topic Bug in the search plugin
I echo that - got the same problem :(

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.


Powered by Kunena Forum