Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / SQL Error in "Products Viewed" in v1.3.9f

SQL Error in "Products Viewed" in v1.3.9f

Locked

Views: 1,591

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
19 Aug 2010, 7:31 AM
#1
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

SQL Error in "Products Viewed" in v1.3.9f

I just upgraded to 1.3.9f from 1.3.9e and followed all the upgrade instructions for uploading the changed files.

Now when I go to view what products have been viewed I am getting this message...

Best Viewed Products
1064 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 'select p.products_id, pd.products_name, pd.products_viewed, l.name from zen_prod' at line 1
in:
[select count(select p.products_id, pd.products_name, pd.products_viewed, l.name from zen_products p, zen_products_description pd, zen_languages l where p.products_id = pd.products_id and l.languages_id = pd.language_id order by pd.products_viewed DESC) as total ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I'm also getting a similar error in the Search Log module I'm using. I assume it's caused by the same error. This is the message I'm getting there...

Search Log
1064 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 'select search_results, search_term, search_time from zen_search_log order by sea' at line 1
in:
[select count(select search_results, search_term, search_time from zen_search_log order by search_time DESC) as total ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I use both of these features on a regular basis and right now they are broken.

Any ideas?

19 Aug 2010, 7:33 AM
#2
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

Actually, I just checked....ALL of my reports (except Customer Referrals) have SQL errors in them.

19 Aug 2010, 7:34 AM
#3
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

It's gotten worse....

I just went to my Products Catalog in the admin section and it's telling me that there is an SQL error there too!

19 Aug 2010, 7:51 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: SQL Error in "Products Viewed" in v1.3.9f

NFM:

I just upgraded to 1.3.9f from 1.3.9e and followed all the upgrade instructions for uploading the changed files.

Now when I go to view what products have been viewed I am getting this message...

Best Viewed Products
1064 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 'select p.products_id, pd.products_name, pd.products_viewed, l.name from zen_prod' at line 1
in:
[select count(select p.products_id, pd.products_name, pd.products_viewed, l.name from zen_products p, zen_products_description pd, zen_languages l where p.products_id = pd.products_id and l.languages_id = pd.language_id order by pd.products_viewed DESC) as total ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I'm also getting a similar error in the Search Log module I'm using. I assume it's caused by the same error. This is the message I'm getting there...

Search Log
1064 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 'select search_results, search_term, search_time from zen_search_log order by sea' at line 1
in:
[select count(select search_results, search_term, search_time from zen_search_log order by search_time DESC) as total ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I use both of these features on a regular basis and right now they are broken.

Any ideas?

What addons do you have installed?
What steps did you follow to do the upgrade you mentioned?

19 Aug 2010, 7:57 AM
#5
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

I have Zen Lightbox, SitemapXML 2.0, Google Base Feeder, Search Log, FAQ Manager, and Testimonial manager installed. All of which use the override system, so I didn't need to edit any of the files that were changed.

I downloaded the fileset and went to the docs to see what files changed. I then proceeded in uploading and overwriting the old files with the new fixed versions. Once that was complete I cleared my cache and restarted my browser. After logging in I went to check the search log but got that error, I then went to see products viewed and noticed the error there. I made my first post here after finding those issues, during that time I did more searching and saw that the SQL errors were all over the place.

I've now reset all my files (except the PayPal fixes) back to 1.3.9e and everything is fine again. If I knew which files where connected to each other I'd install the bug fixes one by one to see when the error comes up. I think it's either in the Advanced Search Results fix, the Advanced Search fix, or maybe in the Application Bottom files (I noticed that when I went to load the pages with the sql error the bottom of the pages wouldn't load in the Admin section).

I hope that helps

19 Aug 2010, 10:01 AM
#6
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,878
Plugin Contributions:
3

Re: SQL Error in "Products Viewed" in v1.3.9f

What version of mysql are you using

19 Aug 2010, 10:59 AM
#7
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

wilt:

What version of mysql are you using

MySQL 5.1.48

19 Aug 2010, 11:31 AM
#8
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

Hi,

The errors you are seeing would indicate an error in the /admin/includes/classes/split_page_results.php file. There was a small change to that file in v1.3.9f but I can't see how that change would cause the errors you are seeing. I've not actually had chance to test v1.3.9f yet though.

Is it possible that the /admin/includes/classes/split_page_results.php file became corrupted during your upgrade? Or possibly the /includes/classes/split_page_results.php file got uploaded to the admin folder by mistake?

Regards,
Christian.

19 Aug 2010, 5:22 PM
#9
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

CJPinder:

Hi,

The errors you are seeing would indicate an error in the /admin/includes/classes/split_page_results.php file. There was a small change to that file in v1.3.9f but I can't see how that change would cause the errors you are seeing. I've not actually had chance to test v1.3.9f yet though.

Is it possible that the /admin/includes/classes/split_page_results.php file became corrupted during your upgrade? Or possibly the /includes/classes/split_page_results.php file got uploaded to the admin folder by mistake?

Regards,
Christian.

Thanks, I was literally up ALL NIGHT trying to figure this out. I'm barely useful at the moment so I'll try again and make sure I didn't upload it to the wrong area a little later.

19 Aug 2010, 5:37 PM
#10
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: SQL Error in "Products Viewed" in v1.3.9f

Okay, you can remove this post from the bugs section.

If you have a section for people that stupidly perform upgrades at 1 o' clock in the morning on little sleep....you can move it there.

CJPinder was most likely right. I noticed that when I went to upload the file he was talking about in Filezilla I could have easily accidentally put it into the admin/includes folder rather than the proper folder since when you look quickly in the window you can see an includes folder even though it's actually in the admin folder when you see it.

Sorry for all the hassle....and thanks for steering me into the right direction.