Jump to content

Search Error


jrodch

Recommended Posts

I recently moved my CubeCart store to another server. Everything seems to be working except the search feature. When I type in a search I get an error saying "Error reporting is disabled in the database class. Please enable to debug."

I don't see where I can turn on error reporting. I'm currently on Host Gator. The site is www.ebbesquaredrains.com.

Thanks!

Link to comment
Share on other sites

Update: The error_log file pointed me to the viewCat.inc.php file. The line it's point to says:

"$matchString = sprintf("MATCH (%s) AGAINST(%s%s)", implode(',', $indexes), $db->mySQLsafe($_REQUEST['searchStr']), $mode);"

I hope this helps.

Thanks

Link to comment
Share on other sites

Would you verify the exact version of CC you are using? The closest line of code I found in that file for CC4.4.6 is:

$matchString = sprintf('MATCH (%s) AGAINST(%s IN BOOLEAN MODE)', implode(',', $indexes), $db->mySQLsafe($terms));

In your code, I see the issue where two '%s' sequences are not separated by a space. This could be your problem.

Link to comment
Share on other sites

bsmither: Thanks for the reply. I'm running 4.3.7.

I tried putting a space between the two %s, with the same result.

The error from error_log is [09-Jan-2012 07:44:21] PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /home/ebbe2011/public_html/includes/content/viewCat.inc.php on line 178

Link to comment
Share on other sites

Ok, I have a copy of 4.3.8, so please, from 4.3.7, report back with the statement in viewCat.inc.php found here (around line 131):


    $indexes = $db->getFulltextIndex('inventory', 'I'); //array('inventory', 'inv_lang'));

        

    if (!empty($_REQUEST['priceMin'])...

    if (!empty($_REQUEST['priceMax'])...

The $indexes line gets a list of all table columns declared as a fulltext searchable index. But I see a problem with getFulltextIndex(). I need to see what your statement for 4.3.7 looks like.

There is also another change in the code between 4.3.8 and 4.4.6 that apparently fixes another issue. We can discuss that later.

Link to comment
Share on other sites

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...