Jump to content

[Resolved] Search not working on the web site


dashesndots

Recommended Posts

I am not sure if I have removed something in error but if you do any search on the web site www.cheapsnapframes.co.uk it comes up with no products found.  It should show results for snap frames at the very least.

Could I have done something in error?

Thanks in advance

Tracy

Link to comment
Share on other sites

There have been some security updates of late. Several people have posted here recently who were on older versions, and they had been hacked.

As soon as you can it would be a good idea to upgrade to 6.0.11 or wait for 6.0.12, which should be out soon.

I don't understand Firebug well enough to know how to help, other than to point that out. Sorry.

Link to comment
Share on other sites

In Cubecart's admin, Store Settings, Advanced tab, enable Debugging and enter your IP address in the next field (www.whatismyip.com).

Perform a search. On the displayed page, at the bottom, there will be a grey debug section. Look for the SQL Query that shows the term(s) you were searching for.

This will just confirm that a search query is being made.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Everyone,

Thank you for all your help on this.  I have updated the cubecart now to 6.0.11 so it is all upto date.

I have setup the debug mode and done a search on silver snap.  I am getting this error at the beginning

 

[Notice] /homepages/13/d231984446/htdocs/cheapsnap/classes/cubecart.class.php:772 - Undefined index: search[Warning] /homepages/13/d231984446/htdocs/cheapsnap/classes/catalogue.class.php:204 - Invalid argument supplied for foreach()[Notice] /homepages/13/d231984446/htdocs/cheapsnap/classes/catalogue.class.php:212 - Undefined index: products

 

Also this is showing up on the sql around the search term?

[41] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1592] \"SELECT I.*, MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 36 OFFSET 0 \" - 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 \') AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS\' at line 1','1464729704'); -- (0.0010490417480469 sec) [ERROR - NOT CACHED]
[42] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1592] \"SELECT I.*, MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 36 OFFSET 0 \" - 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 \') AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS\' at line 1','1464729704'); -- (0.0010490417480469 sec) [ERROR - CACHE WRITE]
[43] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1594] \"SELECT COUNT(I.product_id) as count, MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE)) >= 0.5 GROUP BY I.product_id ORDER BY Relevance DESC \" - 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 \') AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS\' at line 1','1464729704'); -- (0.00078511238098145 sec) [ERROR - NOT CACHED]
[44] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1594] \"SELECT COUNT(I.product_id) as count, MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH () AGAINST(\'silver snap\' IN BOOLEAN MODE)) >= 0.5 GROUP BY I.product_id ORDER BY Relevance DESC \" - 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 \') AGAINST(\'silver snap\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS\' at line 1','1464729704'); -- (0.00078511238098145 sec) [ERROR - CACHE WRITE]

Does anyone have any advice on what might be wrong?

Thanks

Tracy

Link to comment
Share on other sites

The SQL errors are caused by nothing to search on. You have words to search for, but the database is wanting to use those words to look through what is called a "FullTextIndex".

However, the database is saying it does not have a FullTextIndex.

This could happen if Cubecart's codebase was upgraded, but the database has not been properly updated to match.

When you enter CubeCart's admin, do you get a warning notice that the database is out of date?

Link to comment
Share on other sites

Thanks Bsmither

No I dont get any warning in cubecart admin however I did upgrade from cubecart 3 to 6.  Is there anything I can run then to get this upto date as quite a few people are trying search can see it in google analytics but we are not serving any products.  It is working on the odd keyword for example A4 brings up results but not a lot is showing any product results just no products found.

Thanks very much

Link to comment
Share on other sites

Unfortunately, this may be a fix that needs to be fully analyzed first.

We need to determine if there is currently a FullTextSearch index in place on the database (Cubecart_inventory table), and if there is, figure out why it is not delivering the data CubeCart needs. Thus, dropping and re-installing the FullTextSearch index would not be the fix.

If this index is not present, this would indicate that other aspects of the database may not be correct.

So, are you familiar with any external utility that can access your database directly, such as phpMyAdmin, a tool typically found among your hosting account's control panel?

 

Link to comment
Share on other sites

Hi Bsmither,

Sorry for the delay I have been away.  I have checked the database and I do not have a column called fulltextsearch in the cubecart inventory table at all?

What can I do to get one instated?

As previously mentioned I upgraded from 3 to version 6 and I had previously had a quite a few mods on the v3 version and was using sir williams BPM for a few years to update the inventory.

Thanks

Tracy

Link to comment
Share on other sites

Sorry if I misled you.

The FullTextSearch is an index, not a table column. When looking at the table's design, you will need to look at the table's indexes.

Currently, the CubeCart_inventory table has these indexes:

Type: BTREE, Key: PRIMARY, On Column: `product_id`
Type: BTREE, Key: status, On Column: `status`
Type: FULLTEXT, Key: fulltext, On Column: `product_code,description,name`

 

Link to comment
Share on other sites

Excellent.

You will need to change the Key_name from "fti_name_desc" to "fulltext" on both rows.

If phpMyAdmin allows you to click [ Edit ] and then simply click in the cell and change the name, then phpMyAdmin should then issue the correct commands to make that change.

That should fix this immediate issue.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...