• [email protected]

    (@cgevolve-studioeu)


    Hi,

    I’m experiencing a strange problem with Custom Field Template after migrating to a production server: my custom fields look ok when I first click on “edit” a page, and then when I click on the “load” button, right next to my list of “boxes” (to change the cft template), the content of the custom field div is returned full of utf-8 characters. The text of tinyMCE areas, as well as custom field labels etc. is concerned (French characters like ç,è,é are replaced). As soon as I load the content with the load button, the French letters are replaced with the strange characters (and so the front is immediately “wasted”) so that I have to copy it back from a safe source and use the wordpress update button.

    The problem seems to be the encoding with the ajax call that cft uses to reload the fields without reloading the page (since the main wordpress tinyMCE area is not affected, that’s my opinion).
    If I don’t change the custom field template and just click the wordpress update button, the field will be correctly stored.

    That only happens inside the cft box (not, for instance, with the main wordpress tinyMCE area).

    While first migrating to this server, I had to specify :

    ini_set(‘default_charset’,”);

    in my wp-config, due to similar problems with character encoding that affected WordPress content. These problems do not exist anymore, thanks to this line, except for custom field template.

    The workaround would be to temporarily put all custom fields in the same template, but that is not suitable for long-term since many single ‘components’ are shared by different wordpress templates, and that would result in a very long list of custom fields.

    Any ideas ?

The topic ‘UTF-8 characters after clicking "load" button’ is closed to new replies.