Forums / Bug Reports / [Done 1.3.7] Error in Search when I only enter a "space"

[Done 1.3.7] Error in Search when I only enter a "space"

Locked

Views: 1,570

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
28 Oct 2006, 12:45 AM
#1
helmetman avatar

helmetman

New Zenner

Join Date:
Aug 2006
Location:
United States
Posts:
28
Plugin Contributions:
0

[Done 1.3.7] Error in Search when I only enter a "space"

If you just put a space(" ") for the search text you see this:

Advanced Search
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 '' at line 10
in:
[select count(distinct p.products_id) as total FROM zen_products p LEFT JOIN zen_manufacturers m USING(manufacturers_id), zen_products_description pd, zen_categories c, zen_products_to_categories p2c LEFT JOIN zen_meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id ]

Perhaps the PHP Function trim(); and/or an if statement could fix this?

28 Oct 2006, 12:53 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.7] Error in Search when I only enter a "space"

I cannot reproduce the error of a search on nothing ...

Have you an URL where we can test this?

What version of Zen Cart are you running? Clean install or an Upgrade?

What happens if you switch to Classic template?

Have you upgraded to v1.3.6 yet, released last night?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Oct 2006, 1:06 AM
#3
helmetman avatar

helmetman

New Zenner

Join Date:
Aug 2006
Location:
United States
Posts:
28
Plugin Contributions:
0

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Ajeh:

Have you an URL where we can test this?

http://www.templates.jgarldt.com/advanced_search_result.html?keyword=+&search_in_description=1

Ajeh:

What version of Zen Cart are you running? Clean install or an Upgrade?

Zen Cart 1.3.5
Database Patch Level: 1.3.5
v1.3.5 [2006-09-26 16:28:14] (Version Update 1.3.0.2->1.3.5)
v1.3.0.2 [2006-09-26 16:28:11] (Version Update 1.3.0.1->1.3.0.2)
v1.3.0.1 [2006-09-26 16:28:11] (Version Update 1.3.0->1.3.0.1)
v1.3.0.1 [2006-08-12 22:39:09] (Fresh Installation)

Ajeh:

What happens if you switch to Classic template?

The same thing

Have you upgraded to v1.3.6 yet, released last night?

Nope

28 Oct 2006, 1:11 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Any idea how you are forcing a search like that where if you tried to do it on the Advanced search it would tell you ... don't do that? :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Oct 2006, 1:13 AM
#5
helmetman avatar

helmetman

New Zenner

Join Date:
Aug 2006
Location:
United States
Posts:
28
Plugin Contributions:
0

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Ajeh:

Any idea how you are forcing a search like that where if you tried to do it on the Advanced search it would tell you ... don't do that? :unsure:

Click in the search input box...press space...click search.

28 Oct 2006, 1:43 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Doctor it hurts when I stick my finger in my eye ...

Don't do that ... :lamo:

Thanks for the update ... we will add a fix for when people hit the space bar 1 to many times rather than enter what they want to search for ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Oct 2006, 1:46 AM
#7
helmetman avatar

helmetman

New Zenner

Join Date:
Aug 2006
Location:
United States
Posts:
28
Plugin Contributions:
0

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Ajeh:

Doctor it hurts when I stick my finger in my eye ...

Don't do that ... :lamo:

Thanks for the update ... we will add a fix for when people hit the space bar 1 to many times rather than enter what they want to search for ... :cool:

alright cool

21 Dec 2006, 7:19 PM
#8
rasrasras avatar

rasrasras

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Ajeh:

I cannot reproduce the error of a search on nothing ...

Have you an URL where we can test this?

What version of Zen Cart are you running? Clean install or an Upgrade?

What happens if you switch to Classic template?

Have you upgraded to v1.3.6 yet, released last night?

I see the same error on my current 1.3.6 zencart implementation. blanks in the search or advanced search generate an SQL error crash with the right bar and bottom bar disappearing. Anyone know of a simple way to patch this (test for blank or blanks and return to home page or something like that ) ??? Thanks, Robert

21 Dec 2006, 7:22 PM
#9
rasrasras avatar

rasrasras

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Re: [Done 1.3.7] Error in Search when I only enter a "space"

Ajeh:

Doctor it hurts when I stick my finger in my eye ...

Don't do that ... :lamo:

Thanks for the update ... we will add a fix for when people hit the space bar 1 to many times rather than enter what they want to search for ... :cool:

I see the same error on my current 1.3.6 zencart implementation, blanks in the search or advanced search generate an SQL error crash. Is there a patch for this ( like IF the joker enters blank or blanks return him to the homepage or something like that ) ??? Thanks, Robert