Skip to main content

Broken Search

More
15 years 6 months ago #11711 by mohairbears
Broken Search was created by mohairbears
Opps I appear to have somehow broken the search, when searching it only finds categories and then when selecting one it then goes to a blank page. I have run debug and it searches ok? below is when debug returned not sure if this shows the problem?

JDatabaseMySQL::query: 1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT a.product_id AS id, a.product_name AS title, a.product_created AS created , a.product_description AS text, "2" AS browsernav FROM jos_hikashop_product AS a LEFT JOIN jos_hikashop_product_category AS b ON a.product_id=b.product_id WHERE a.product_published=1 AND a.product_type='main' AND (a.product_access = 'all' OR a.product_access LIKE '%,29,%') AND b.category_id IN (2,10,11,12,49,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,36,42,41,47,71,48,50,51,56,53,54,66,65,67,63,64,68,69,70,74,75,76) AND ((a.product_name LIKE '%eyes%')) OR ((a.product_description LIKE '%eyes%')) ORDER BY a.product_name DESC LIMIT 0, 50
Call stack
# Function Location
1 JSite->dispatch() /home/sites/mohairbearmakingsupplies.co.uk/public_html/index.php:69
2 JComponentHelper->renderComponent() /home/sites/mohairbearmakingsupplies.co.uk/public_html/includes/application.php:124
3 require_once() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/application/component/helper.php:162
4 JController->execute() /home/sites/mohairbearmakingsupplies.co.uk/public_html/components/com_search/search.php:25
5 SearchController->display() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/application/component/controller.php:236
6 JController->display() /home/sites/mohairbearmakingsupplies.co.uk/public_html/components/com_search/controller.php:38
7 SearchViewSearch->display() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/application/component/controller.php:310
8 JView->get() /home/sites/mohairbearmakingsupplies.co.uk/public_html/components/com_search/views/search/view.html.php:112
9 SearchModelSearch->getData() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/application/component/view.php:364
10 JDispatcher->trigger() /home/sites/mohairbearmakingsupplies.co.uk/public_html/components/com_search/models/search.php:141
11 JEvent->update() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/event/dispatcher.php:170
12 call_user_func_array() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/event/event.php:67
13 plgSearchHikashop_products->onSearch()
14 JDatabaseMySQLi->loadObjectList() /home/sites/mohairbearmakingsupplies.co.uk/public_html/plugins/search/hikashop_products.php:147
15 JDatabaseMySQLi->query() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/database/database/mysqli.php:474
16 JError->raiseError() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/database/database/mysqli.php:247
17 JError->raise() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/error/error.php:171
18 JException->__construct() /home/sites/mohairbearmakingsupplies.co.uk/public_html/libraries/joomla/error/error.php:136

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

More
15 years 6 months ago #11718 by nicolas
Replied by nicolas on topic Re: Broken Search
If you get a blank page when you click on a category in the search results, that's because you didn't set the Itemid option of the hikashop category search plugin's options. You should set in it the id of a hikashop category listing menu so that hikashop knows how to display the content under the category you clicked on in the search page.

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

More
15 years 6 months ago #11793 by mohairbears
Replied by mohairbears on topic Re: Broken Search
Hi, I have sorted out most of it but I still have 2 problems that I cannot solve
1. The product search does appear to work unsure how to make it work either if you see the screen dump you can see Velvet in the product name, searching for this drew a black, I put in the description and it now finds it but only in the Categories? name is set in the product seach module.

2. Again see the screen dump and Accessories is in the top corner, this should not be so but I cannot seem to stop it during a search?

any ideas please.

thanks

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

More
15 years 6 months ago #11796 by nicolas
Replied by nicolas on topic Re: Broken Search
Could you try to replace the line:
$leftjoin=' LEFT JOIN '.hikashop::table('product_category').' AS b ON a.product_id=b.product_id';
by:
$leftjoin=' INNER JOIN '.hikashop::table('product_category').' AS b ON a.product_id=b.product_id';
in the file plugins/search/hikashop_products.php and try again ?

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

More
15 years 6 months ago #11819 by mohairbears
Replied by mohairbears on topic Re: Broken Search
Hi, yes tahnks that's got the products sorted but I still cannot stop the below happening.

2 Again see the screen dump above and "Accessories" is in the top corner, this should not be there and appears at the top of every category instead of the correct category title.

thanks

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

More
15 years 6 months ago #11824 by nicolas
Replied by nicolas on topic Re: Broken Search
Could you give a link to what you're talking about because I don't understand what you're talking about.

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

More
15 years 6 months ago #11825 by mohairbears
Replied by mohairbears on topic Re: Broken Search
www.mohairbearmakingsupplies.co.uk do a search for 'glass eyes' the top 3 searchs are all categories but do not display the category name but display 'Accessories' instead, yet if you go to the links direct they show the correct category name.

thanks

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

More
15 years 6 months ago #11826 by nicolas
Replied by nicolas on topic Re: Broken Search
In the options of your search plugin, you set the Itemid to 2 which is the id of your menu "accessories". That's because in the hikashop options of that menu, you need to set the option "Use menu name instead of category name for the title" to no so that it displays the name of the current category and not the name of the menu.

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

More
15 years 6 months ago #11827 by mohairbears
Replied by mohairbears on topic Re: Broken Search
yeah got it thanks

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

Time to create page: 0.198 seconds
Powered by Kunena Forum