Author Topic: inch character not working  (Read 728 times)

Nilsy

  • Jr. Member
  • **
  • Posts: 73
    • Sexhibition
  • VirtueMart Version: 3.6.2 10159
inch character not working
« on: August 19, 2016, 13:54:04 pm »
VM 3.0.16
J3.6.2
PHP Version 5.6.24
Apache

I know this has been taken up before, but I can't see any solution thread.

If I have a product title, for example: Chair only 22"
-The character " gets removed, and the page default to the 1064 syntax error.

The fault message I get is:
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 '"Chair only 22"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMI' at line 1 SQL=SELECT p.`virtuemart_product_id`, `l`.`product_name`,`l`.product_name FROM `#__virtuemart_products` as p INNER JOIN `#__virtuemart_products_nb_no` as l using (`virtuemart_product_id`) LEFT JOIN `#__virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `#__virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` WHERE ( `pc`.`virtuemart_category_id` = 40 AND ( `ps`.`virtuemart_shoppergroup_id`= "5" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) AND p.`virtuemart_product_id`!="6726" AND `l`.product_name <= "Chair only 22"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMIT 1
Joomla 3.9.12

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4348
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: inch character not working
« Reply #1 on: August 19, 2016, 14:13:35 pm »
I have already reported it for some weeks.
I think it's fixed in VM 3.0.17.6
The problem is "Chair only 22"", you have 2 time double quotes and this do an invalid mySql query.
A solution is to use the HTML code:
Code: [Select]
&quot;    standard
&#34;     numeric
&#x22;    hexa

Nilsy

  • Jr. Member
  • **
  • Posts: 73
    • Sexhibition
  • VirtueMart Version: 3.6.2 10159
Re: inch character not working
« Reply #2 on: August 19, 2016, 14:37:55 pm »
Thank you... but where do I stick that code?
Or is it better just to write inch at the moment and wait for the update?
Joomla 3.9.12

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9748
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: inch character not working
« Reply #3 on: August 19, 2016, 14:52:19 pm »
you manually use one of them in the title as u write it
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4348
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: inch character not working
« Reply #4 on: August 19, 2016, 16:18:27 pm »
Replace in your product title
Code: [Select]
Chair only 22" to
Code: [Select]
Chair only 22&quot;Note this can have side effect to, when product title is used in an encoded HTML tag, so the only valid solution is to remove the double quote or update VM.

Nilsy

  • Jr. Member
  • **
  • Posts: 73
    • Sexhibition
  • VirtueMart Version: 3.6.2 10159
Re: inch character not working
« Reply #5 on: August 22, 2016, 09:00:55 am »
 :-[ me being stupid...
-Note to self, please use glasses when reading...
Joomla 3.9.12