Issue with Polylang since 2.x (malformed wpml-config.xml files)
-
Since Polylang 2.0, a new xml parser (Simple XML) is used to read wpml-config.xml files. The reason for this move is the performance.
The drawback (that I did not foresee before making the change as I never intentionally tested malformed wpml-config.xml files) is that this parser has no tolerance to XML syntax errors, while the old one was very tolerant. Some malformed wpml-config.xml files are readable in WPML or Polylang < 2.0 and are no more readable in Polylang 2.0+.
The consequence for the users are:
* Strings don’t appear in strings translations admin panel.
* Custom post types / custom taxonomies not correctly managed.
* Custom fields are not synchronized across posts.One error breaks the complete wpml-config.xml file (Polylang will still read other files which are correctly written).
Users running their site in DEBUG mode will also see warnings starting with:
PHP Warning: simplexml_load_file()
What to do if you suspect such error?
You can check the syntax of a wpml-config.xml file in an online XML validator such as https://www.w3schools.com/xml/xml_validator.asp. It will tell you where the error is. Then ask the author to fix the error.
So far, I found such errors in:
* Pinnacle (fixed in 1.4.4)
* Virtue Premium (probably fixed in latest version, same author as Pinnacle)
* Content Aware Sidebars (PR proposed to the author on Github).
* WooCommerce Cash on Pickup (not maintained for 2 years)Errors are also suspected (I did not check myself) in:
* Zerif Pro
* WooCommerce Tab Manager
- The topic ‘Issue with Polylang since 2.x (malformed wpml-config.xml files)’ is closed to new replies.