virtuemart 3.0.6.2 search module results mysql error 1064 of quotes in pr.name

Started by berghoff, March 10, 2015, 12:39:19 PM

Previous topic - Next topic

berghoff

Hi.
Just migrated to vm3 and noticed an error:
virtuemart 3.0.6.2 search module results mysql error 1064 of quotes in product name:
You can examine it over link below:
http://www.posudy.net/katalog-tovarov/search.html?keyword=1112466&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0
the result looks OK and when I select the desided goods I receive:

Error: 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 'Vision Premium"" ORDER BY `l`.product_name DESC LIMIT 1' at line 1 SQL=SELECT p.`virtuemart_product_id`, `l`.`product_name` FROM `edgb_virtuemart_products` as p INNER JOIN `edgb_virtuemart_products_ru_ru` as l using (`virtuemart_product_id`) LEFT JOIN `edgb_virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `edgb_virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` WHERE ( `pc`.`virtuemart_category_id` = 16 AND ( `ps`.`virtuemart_shoppergroup_id`= "1" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) AND p.`virtuemart_product_id`!="2859" AND `l`.product_name <= "12 пр. Набор посуSPAMы "Vision Premium"" ORDER BY `l`.product_name DESC LIMIT 1

isn't it easier just to use virtuemrat_product_id?

Waiting for your reccomendations.

Milbo

It is the sql searching for the neighboured products. The name of the product has two "" and they are not correctly encoded there. It is strange, I took the name of your product and cannot reproduce it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

berghoff

Now i see it is not the search issue.

You can find the product name and another samples in category below:
http://www.posudy.net/katalog-tovarov/berghoff/posuda/vision.html

I can easily replace the "" but I'm not sure it is the right solution and i do not want to make any modifications to virtuemart because of its update process witch overwrites all files.

Waiting for your ideas.

Found the solution to replace " with &quot; ower the link below: http://forum.virtuemart.net/index.php?topic=119483.0


Milbo

I changed that, works except in the search. that is atm the only problem
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

siao

in VM 3.0.10 the same problem
product pages with old products named with double quotes show sql error 1064
if I create new product with double quotes so page with proiduct details look good.
What should I do for repair this?
thanks

GJC Web Design

do a general search replace in your vm products titles to replace " with &#34;

(double check I have   &#34;  correct! -- from memory)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation