VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: quartus on November 04, 2015, 12:19:30 PM

Title: Strange Chinese characters in price field (no multilingual shop)
Post by: quartus on November 04, 2015, 12:19:30 PM
Hi

After a migration from Joomla 2.5.28 and VM 2 to 3.0.9 (in the meantime updated to 3.0.10), we have a very strange issue with the price field in our vm shop:

In the middle of the displayed price, a chinese character is displayed. This is how it looks like

Fr. 1鮦.80  :o


I just don't figure it out, where the problem is. Since we should have gone online by last week, I desperately hope, anyone knows about this problem - an even more important - knows, how to solve it or where to search for the reason.

thanks in advance for any help!
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: GJC Web Design on November 04, 2015, 13:51:41 PM
without a live url to the prob pages highly unlikely
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: PRO on November 04, 2015, 21:58:52 PM
I would 1st look in your currency settings

then, it could be an encoding issue

are you testing with my template overrides?
Title: Re: Strange Chinese characters in price field (non multilingual shop)
Post by: quartus on November 06, 2015, 11:13:53 AM
Dear PRO, dear GJC

Thanks for checking my topic!

@ PRO: sorry, what to you mean by "are you testing with my template overrides?"

I did check the language / currency option as well. Everyhting seems to be set correctly there. I also changed the font without any result. I just don't get, why just one single character in the middle of the field value is changed.

So here I'am with the link to the product page with the issue:

http://test.metallbauteile.ch/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=115&Itemid=324 (http://test.metallbauteile.ch/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=115&Itemid=324)

the other product with child products works like it should, I don't see any difference between them.

http://test.metallbauteile.ch/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&Itemid=270 (http://test.metallbauteile.ch/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&Itemid=270)

user: mbtsag
pass: mbtsag

thank you.
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: PRO on November 06, 2015, 11:40:07 AM
i mean, have you tried with a standard joomla template
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: GJC Web Design on November 06, 2015, 13:36:22 PM
totally bizarre.. it really is coming back with a chinese encode letter

Fr. 2&#39262.60

http://www.isthisthingon.org/unicode/index.phtml?glyph=995E

{"basePrice":null,"variantModification":null,"basePriceVariant":null,"basePriceWithTax":null,"discountedPriceWithoutTax"
:null,"salesPrice":"Fr. 2&#39262.60","priceWithoutTax":"Fr. 2&#39095.00","salesPriceWithDiscount":null
,"discountAmount":null,"taxAmount":"Fr. 167.60","unitPrice":null,"messages":"\n<div id=\"system-message-container
\">\n<\/div>"}

as pro said try with with the protostar template
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: Jörgen on November 06, 2015, 13:47:32 PM
Hello

I agree with GJC and Pro that this probably lies in the template overrides. Could be some styling of the price that has a missing quote or a wrongly escaped character ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: quartus on November 10, 2015, 11:30:05 AM
thank you, guys!

I'm checking out the template / override approach right now and get back to you.
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: quartus on November 10, 2015, 12:06:23 PM
Hello everybody

I just deactivated the overrides in the template (by deleting the folder) and I even activated the checkbox "use vm css" in the vm configuration. Although the layout was - like expected - completely destroyed - the creepy little chinese signs persist. >:(

Now I noticed, the chinese characters are even there in the vm backend (products), but only in the list view. When I open the product (to "kill" the chinese character out of the field) they're gone - the price is like it should be, but unfortunately only there in the product details.

As far as I understand the situation, I could now exclude the template overrides so far (could I?). This and detecting the problem in the backend as well would mean... uhm, what exactly?

Thank's for any other ideas.
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: Milbo on November 10, 2015, 13:53:43 PM
Maybe it is the characterset of your server?
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: quartus on November 10, 2015, 17:58:34 PM
hey folks - I guess I found the cause, but honestly I have no idea where to fix it...

The problem obviously occurs, when I use the standard thousands seperator ' which is used by default in the Swiss currency settings.

When I use another separator (´), the bloody Chinese signs are gone - everywhere! Although ´ is actually not the right separator for Switzerland, I'm more than fine with this workaround.

But the (non-urgent) question remains: What is happening exactly (and where)? Since the problem occurs despite the activated template, it must be a problem in the guts  of my virtuemart installation (maybe caused by the migration)? Maybe anybody has a clue?

Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: Jörgen on November 10, 2015, 18:38:08 PM
Hello

Using a quote in the middle of the value does give some problems. See if You can use the escape character sequence for the quote sign:
&#39;

Regards

Jörgen @ Kreativ Fotografi
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: Milbo on November 10, 2015, 20:58:34 PM
damn this forum needs an update for "like this. Yepp, Jörgen that is the answer.
Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: quartus on November 11, 2015, 18:07:25 PM
Thanks, Jungs!

I already tried to enter

&#39;

in the field "thousands seperator". The mysterious signs from the PRC are instantly back again. When I check the thousands separator field again, my new entry has been striped to just a "&".

Kinda weird, isn't it?

Title: Re: Strange Chinese characters in price field (no multilingual shop)
Post by: Jörgen on November 11, 2015, 18:48:32 PM
Hello quartus

That should have been the answer. There must be some decoding that misses the target. Looks like a mission for Max.

have a nice evening :)

Jörgen @ Kreativ Fotografi