Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Advance Search Results SQL syntax error after 1.3.9b upgrade

Advance Search Results SQL syntax error after 1.3.9b upgrade

Locked

Views: 811

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
12 May 2010, 11:08 PM
#1
chrisruggia avatar

chrisruggia

New Zenner

Join Date:
Jul 2009
Posts:
3
Plugin Contributions:
0

Advance Search Results SQL syntax error after 1.3.9b upgrade

Hello Everyone,

I have upgraded http://www.fsbooks.com/shop/ to 1.3.9b with (I thought) no problems.

But I just discovered that my advanced search results are generating the following error:

"1064 You have an error in your SQL syntax; ...."

The syntax error seems to be that the "order by" clause is duplicated at the end of the SQL request.

I dug through includes>modules>pages>advanced_search_result>header_php.php over and over, but couldn't figure out why it was generating the error.

THEN I noticed that the breadcrumbs are ALSO duplicated. It appears that for some reason this particular header_php.php file is being called twice. The problem doesn't occur on any other pages that I can find.

Can anyone give me some ideas how this might happen, and where I might look for a fix?

Here's a link for a search showing the problem:
http://www.fsbooks.com/shop/index.php?main_page=advanced_search_result&keyword=big&search_in_description=1&categories_id=&pfrom=&pto=&x=0&y=0

Any suggestions very gratefully appreciated.

13 May 2010, 5:16 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

How many header_php files are in that folder?
Remember: ALL "backup" files should NEVER use the original ".php" or ".css" or ".js" extension. If you're going to make backups by renaming a file, ALWAYS use a different file extension, like ".bak"

13 May 2010, 12:23 PM
#3
chrisruggia avatar

chrisruggia

New Zenner

Join Date:
Jul 2009
Posts:
3
Plugin Contributions:
0

Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

I had no idea!

When I have edited the SQL calls in the header_php files, I've just added "-OLD" before the suffix to keep a copy of the original file.

I'm not too optimistic, though, because I have half a dozen others similarly edited and backed up without causing the issue.

I will change all the suffixes and report back.

THANKS for the tip!

13 May 2010, 12:34 PM
#4
chrisruggia avatar

chrisruggia

New Zenner

Join Date:
Jul 2009
Posts:
3
Plugin Contributions:
0

Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

I wasn't optimistic, but I was completely wrong because the issue was fixed by removing the backup file with its .php extension.

Now re-renaming all of my backup files.

Best practice, here I come!

DrByte, you are my favorite person today. THANK YOU!