XML Errors in PrestaShop: How to Diagnose and Fix Them

On this page
  1. Why This Happens
  2. Solution: Delete the Corrupted XML File
  3. Clear the PrestaShop Cache
  4. Alternative Solution
  5. Important Note
  6. Summary

PrestaShop may sometimes display errors related to XML files in the administration panel. These errors usually appear when PrestaShop cannot correctly read a file downloaded from the PrestaShop Addons service.

Common examples include:

Error found: Extra content at the end of the document in country_module_list.xml file
Error found: Sequence ']]>' not allowed in content in country_module_list.xml file
Error found: Premature end of data in tag badge line 1 in must_have_module_list.xml file
Error found: StartTag: invalid element name in country_module_list.xml file

These messages usually indicate that one of the XML files used by PrestaShop is incomplete or corrupted.

Why This Happens

PrestaShop regularly connects to the Addons module directory to download module-related XML files.

If the connection is interrupted, or if the external server does not respond correctly, the XML file may be saved only partially. When PrestaShop later tries to read that file, it detects invalid XML structure and displays an error in the back office.

This issue is usually related to cached or incomplete XML data, not to the products or orders in your store.

Solution: Delete the Corrupted XML File

Before making changes, create a backup of the affected file.

  1. Connect to your store files using FTP.
  2. Go to the following directory:
/config/xml
  1. Locate the XML file mentioned in the error message.

For example:

default_country_modules_list.xml
  1. Download a copy of the file to your computer as a backup.
  2. Delete the file from the server.

PrestaShop should download the file again later, usually in the correct format.

Clear the PrestaShop Cache

After deleting the corrupted XML file, clear the store cache.

From the PrestaShop back office, go to:

Advanced Parameters → Performance → Clear cache

You can also clear the cache manually through FTP by going to:

/cache/smarty/compile

Delete the directories located inside this folder.

Do not delete the compile folder itself.

Alternative Solution

If deleting the XML file and clearing the cache does not resolve the issue, the connection to the PrestaShop Addons service can be disabled in the PrestaShop files.

This requires editing a core file, so create a backup before making changes.

  1. Connect using FTP.
  2. Open the following file:
/classes/Tools.php
  1. Find this line:
protected static $is_addons_up = true;
  1. Replace it with:
protected static $is_addons_up = false;
  1. Save the file and clear the PrestaShop cache again.

Important Note

Editing core PrestaShop files should be treated as a temporary workaround. Core changes may be overwritten during future PrestaShop updates.

If the issue returns frequently, check whether your store can reliably connect to the PrestaShop Addons service and whether any firewall or server security rules are interrupting outgoing connections.

Summary

XML errors in PrestaShop usually happen when module-related XML files are downloaded incompletely or become corrupted. In most cases, deleting the affected XML file from /config/xml and clearing the cache resolves the issue. If the problem persists, disabling Addons requests in Tools.php may be used as a temporary workaround.

Didn't find an answer?

Our support team is here for you 24/7 – write to us and we will help you sort it out.