Author Topic: Problem with ' changed into ' in titles  (Read 175 times)

Rikard

  • Beginner
  • *
  • Posts: 11
  • A beginner
Problem with ' changed into ' in titles
« on: May 31, 2018, 07:51:41 am »
Hi
I've got a site with four languages, english is the default language. When I add product titles such as "It's a Happy Cake" and save in english everything looks fine. Then when I switch to another language the ' is replaced with '. So far so good, problem is that it's not shown as ' in the frontend, it is shown as '. This can of course be the template, or joomla or whatever. But, there is something strange in VM as well, because everytime I open the product, another ' is added to the title. The front end reads "It's a Happy Cake". Please note the absent & from the second instance. This is true for all duplicates that are added by entering the product over and over.

I have tested with a few more special characters and the same is true for " (inch) but I didn't find this behaviour for any other special characters.

My system
-----
Virtuemart: 3.2.14
Joomla: 3.8.8
php: 7.1.17-1+ubuntu16.04.1+deb.sury.org+1
-----

Best regards,
Rikard

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9590
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problem with ' changed into ' in titles
« Reply #1 on: May 31, 2018, 12:13:54 pm »
That is indeed a very interesting observation. I have no real answer now. Must have something todo with the language locale of php.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

StefanSTS

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 120
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Problem with ' changed into ' in titles
« Reply #2 on: May 31, 2018, 12:25:07 pm »
I can confirm this behaviour for ' and " in VM 3.2.14.

If the backend language is EN, the english product name is saved with the ' or ". The product name in the other language is saved with an escape character.
Product 'something
After another save it becomes:
Product 'something

If you switch the backend language the problem occurs vice versa.
Means the product name is always saved normally (without escape characters) in the used backend language.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9590
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problem with ' changed into ' in titles
« Reply #3 on: June 05, 2018, 22:32:15 pm »
Hmm, means that we need to set the language locale extra. the language locale tells php how to interprete. I am not sure about that, but could be an explanation.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/