twhite3000 / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

Parentesis causing error #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is my vqmod file:

<modification>
    <id></id>
    <version>1.5.x</version>
    <vqmver>1.0.8</vqmver>
    <author></author>   
    <file name="catalog/controller/checkout/register.php">
        <operation>
            <search position="after" offset="2"><![CDATA[if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request->post['firstname']) > 32)) {]]></search>
            <add><![CDATA[              
                if (!is_int($this->request->post['cpf'])) { $json['error']['cpf'] = "Informe o CPF (Somente números)"; }
                if (!is_int($this->request->post['rg'])) { $json['error']['rg'] = "Informe o RG "; }]]>
            </add>
        </operation>
    </file> 
</modification>

The parentheses in the string "Informe o CPF (Somente números)" raises the 
"DOM UNABLE TO LOAD" error.

Original issue reported on code.google.com by tonho...@gmail.com on 21 Oct 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Are you sure this is the parentheses? Check by changing it so that there is NO 
SPACE between ]]> and </add>
It could also be the ú that is causing the issue

Original comment by DJG6...@gmail.com on 21 Oct 2011 at 9:14

GoogleCodeExporter commented 9 years ago
Also, try adding
<?xml version="1.0" encoding="UTF-8"?>
to the top of the file to see if that helps

Original comment by DJG6...@gmail.com on 21 Oct 2011 at 9:16

GoogleCodeExporter commented 9 years ago
"Are you sure this is the parentheses?"
Yep. Works fine if I remove it.

I'll try put <?xml version="1.0" encoding="UTF-8"?> on the top and I post the 
result here...

Thanks!

Original comment by tonho...@gmail.com on 23 Oct 2011 at 5:32

GoogleCodeExporter commented 9 years ago
Sorry guys ...
The problem was the accents and the charset of file ...

Thanks!

Original comment by tonho...@gmail.com on 23 Oct 2011 at 7:09

GoogleCodeExporter commented 9 years ago
It's recommended to put <?xml version="1.0" encoding="UTF-8"?> at the top of 
all vqmod xml files for full UTF-8 compatibility. Glad it's fixed

Original comment by DJG6...@gmail.com on 24 Oct 2011 at 5:32