Keyword

k2 Search plugin not working.

  • Ashesh
  • Ashesh's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84878 by Ashesh
k2 Search plugin not working. was created by Ashesh
When i enable k2 search plug-in, joomla's default search is not working.Its giving me blank page.But when k2 plugin is disable its working well.Problem is that with k2 plugin my site's default searching is not working.Warning: Invalid argument supplied for foreach() in plugins\search\k2.php on line 283Thanks

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

More
14 years 3 months ago #84879 by nulele
Replied by nulele on topic k2 Search plugin not working.
Hi,
I'm using K2 2.2 with Joomfish! and have the same problem but without the warning.

If I use K2 search module, I get blank page... even downgrading to K2 search plugin 2.1!!
If I use the J! default search module searching for K2 items, it works weird: I get results only either if searched word is double-quoted in search field or Any words/Exact Phrase is checked in the search form.

I think is totally a mess!! There are several threads in the forum and not yet a certain, valid solution to this problem.

Anybody at K2 team can please give us a solution?
Thank you

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

  • Ashesh
  • Ashesh's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84880 by Ashesh
Replied by Ashesh on topic k2 Search plugin not working.
Hello,

I got the solution.

I installed k2 search plugin. using this link you can download this plugin
giftcity.co.in/ashesh/plg_search_k2_svn_hacked.zip
and did some changes in k2.php file.

replace this code

if (count($rows)) {
foreach ($rows as $row) {
$new_row = array();
foreach ($row as $key=>$item) {
$item->browsernav = '';
if (searchHelper::checkNoHTML($item, $searchText, array('text', 'title', 'metakey', 'metadesc', 'section', 'cdescription', 'image_caption', 'image_credits', 'video_caption', 'video_credits', 'extra_fields_search'))) {
$new_row[] = $item;
}
}
$results = array_merge($results, (array) $new_row);
}
}

with this edited code

if (count($rows)) {
foreach ($rows as $row) {
$new_row = array();
foreach ($row as $key=>$item) {
$item->browsernav = '';
// if (searchHelper::checkNoHTML($item, $searchText, array('text', 'title', 'metakey', 'metadesc', 'section', 'cdescription', 'image_caption', 'image_credits', 'video_caption', 'video_credits', 'extra_fields_search'))) {
$new_row[] = $item;
// }
}
$results = array_merge($results, (array) $new_row);
}
}

nulele said:Hi,I'm using K2 2.2 with Joomfish! and have the same problem but without the warning.If I use K2 search module, I get blank page... even downgrading to K2 search plugin 2.1!!If I use the J! default search module searching for K2 items, it works weird: I get results only either if searched word is double-quoted in search field or Any words/Exact Phrase is checked in the search form.I think is totally a mess!! There are several threads in the forum and not yet a certain, valid solution to this problem.Anybody at K2 team can please give us a solution?Thank you

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

More
14 years 3 months ago #84881 by nulele
Replied by nulele on topic k2 Search plugin not working.
Hi,
I also have found a solution to the problem by downgrading to K2 search plugin v.2.1.
The problem seems to be the new function MATCH used in the query instead of the LIKE function of the old plugin version.

Thank you anyway!

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

More
13 years 4 months ago #84882 by trip
Replied by trip on topic k2 Search plugin not working.
Hi All

the suggestions did not solve this, has any body else got an idea on this

 

Warning: Invalid argument supplied for foreach() in/home/xxx/public_html/plugins/search/k2.php on line 351

 

K2 Version: 2.5

 

@nulele, on which line did you change the query ?

 

Would welcome some suggestions on this

Matthew

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


Powered by Kunena Forum