News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Custom fields bug (quotation mark)

Started by d0ublezer0, March 18, 2012, 08:16:22 AM

Previous topic - Next topic

d0ublezer0

When edit custom fields in product manager, I set the value of some fields (waist size, for example) to 32" (digit with quotation mark) - after save i've got list of fields without quotation marks (only digits).
In page code i see this:
<input type="text" name="field[0][custom_value]" "="" value="32">
As you can see, quotation mark are displayed separately, as attribute of text field.
But in database table custom value stored as I entered in previous stage (with quotation mark).

When i do another save of product, quotation marks was removed from database.

2.0.3e

MarioP

Hello,
I'm working on VM 2.0.16 and the problem still exists. I'm setting the custom field type as string. When I set the value of this field to e.g.  2", after save i've got the value without quotation mark (only digit). How can I fix it? Please help

franzpeter

I think the quotation marks are filtered out, because they may disturb php code. It is not a very good idea to use quotation marks or - if absolutely necessary - they should get encoded with &quot;.

MarioP

Thanks franzpeter. &quot; seems to be working. Even thought the field value it's not display properly in the back-end, in the front-end it's ok. (e.g. I've set the value on 15&quot; - after save in back-end appears 15, in front-end - 15") 

d0ublezer0

OK, OK. But the processing of the text must be in the system by default.
We must not cut, and add escape characters. Replace some of the characters to their counterparts.
e.g. &quot; &lt; &rt;

MarioP

#5
Hi,
Maybe in the meanwhile someone has found a solution to permanently put quotation marks in the custom field? &quot; works but like was mentioned is removed after next product edit (saving the product) what is very annoying when we have to edit a few products.
Maybe there's no way, and will not be the way to solve that problem due to
Quote from: franzpeter on January 16, 2013, 11:14:53 AM
I think the quotation marks are filtered out, because they may disturb php code.
Thanks for any information