{"id":6207,"date":"2026-03-21T14:42:41","date_gmt":"2026-03-21T13:42:41","guid":{"rendered":"https:\/\/cocos.codes\/?p=6207"},"modified":"2026-03-21T15:08:25","modified_gmt":"2026-03-21T14:08:25","slug":"prestashop-1-6-and-1-7-xml-error-in-admin-panel","status":"publish","type":"post","link":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/archives\/prestashop-1-6-and-1-7-xml-error-in-admin-panel\/","title":{"rendered":"PrestaShop 1.6 and 1.7 - XML error in admin panel (must_have_modules_list.xml, modules_native_addons.xml)"},"content":{"rendered":"Is the PrestaShop module manager throwing an XML error? Below, we explain why this is happening and how to effectively fix it \u2013 without needing to update your store or make changes to the database.<br \/><br \/><h6>What are the XML files in the config\/xml\/ directory?<\/h6>PrestaShop stores several XML files locally that are responsible for the operation of the sections <strong>Modules &gt; Module Manager<\/strong> in the admin panel. They are downloaded cyclically from an external API <a href=\"https:\/\/addons.prestashop.com\/pl\/prawne\/96548-eu-cookies-law-rodo-google-consent-20.html?search_query_id=3b8c0da3b7e22e70c1e6bbb5ac6b2ca2&amp;search_index=Products_PL_relevance\" target=\"_blank\" rel=\"noopener\">PrestaShop Addons<\/a> and saved in the directory:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>config\/xml\/<\/code><\/pre><\/div>The most important ones are:<br \/><br \/><ul><li><span class=\"cc-highlight\">must_have_modules_list.xml<\/span> \u2013 list of modules marked as \u201emust have\u201d by PrestaShop<\/li><li><span class=\"cc-highlight\">modules_native_addons.xml<\/span> \u2013 list of native modules available in Addons<\/li><li><span class=\"cc-highlight\">default_country_modules_list.xml<\/span> \u2013 suggested modules for a specific country<\/li><li><span class=\"cc-highlight\">trusted_modules_list.xml<\/span> - List of trusted modules verified by PrestaShop<\/li><\/ul>These files do not affect the store's frontend or order processing. They are used solely for displaying information in the admin panel's modules section.<h6><br \/>An XML error appears when there's a problem with the structure or syntax of an XML document. It typically occurs during the parsing or processing of the XML file by software, such as a web browser, an application, or a server.\n\nHere's a breakdown of what an XML error looks like and where it can appear:\n\n**What an XML Error Looks Like:**\n\nXML errors are usually reported by the software that is trying to read the XML file. The message will typically indicate:\n\n*   **The nature of the error:** This could be a \"syntax error,\" \"parsing error,\" \"malformed XML,\" \"invalid character,\" \"unexpected end of file,\" etc.\n*   **The location of the error:** This is crucial for debugging. The error message will usually point to:\n    *   **Line number:** The specific line in the XML file where the error was detected.\n    *   **Column number:** The position on that line where the error occurred.\n    *   **Error code (sometimes):** A specific code indicating the type of problem.\n*   **A description of the problem:** A brief explanation of what is wrong (e.g., \"element is not closed,\" \"attribute value is not quoted\").\n\n**Common examples of specific error messages might include (these vary by parser):**\n\n*   `XML parsing error: '...' is not followed by '&gt;'`\n*   `Error: Unclosed token.`\n*   `XML validation error: Element '...' is not closed.`\n*   `Error near line 10, column 5: Expected '&gt;', but found ' '`\n*   `Fatal Error: The element type \"...\" must be terminated.`\n\n**Where XML Errors Appear:**\n\nXML errors can appear in various contexts, depending on how and where the XML is being used:\n\n1.  **Web Browsers:** When you try to open an XML file directly in a web browser, if the XML is malformed, the browser will display an error message along with the line numbers indicating the problem. This is often the first place developers encounter XML errors.\n\n2.  **Web Servers\/Applications:**\n    *   **API Responses:** If a server is supposed to return data in XML format but fails due to an error in its XML generation, the client application receiving the response will get an XML parsing error.\n    *   **Configuration Files:** Many web applications use XML for configuration. If a configuration file is invalid, the application will fail to start or encounter errors during its operation.\n    *   **Data Exchange:** When applications exchange data using XML (e.g., SOAP messages), an error in the XML structure of the message will cause the receiving application to report a parsing error.\n\n3.  **Desktop Applications:** Applications that read or write XML files for data storage, settings, or interoperability will report XML parsing errors if the files they encounter are invalid.\n\n4.  **Databases:** Some databases store XML data. If you try to import or query XML data that is malformed, the database system will flag it as an error.\n\n5.  **XML Editors and IDEs:** Development environments and specialized XML editors will often perform real-time validation as you type. They will highlight syntax errors directly in the editor, often with red squiggly lines and pop-up error messages.\n\n6.  **Command-Line Tools:** Tools like `xmllint` or other XML parsers used in scripts will output error messages to the console when processing invalid XML.\n\n**In summary, an XML error is a notification that an XML document violates the rules of XML syntax or structure, and it appears within the software attempting to interpret that document.**<\/h6>The error most often appears directly in the admin panel \u2013 in the tab <strong>Modules<\/strong> or after entering <strong>Module Manager<\/strong>. Messages can look like this:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>Error found: Start tag expected, '&lt;&#039; not found in must_have_modules_list.xml file\nError found: Start tag expected, &#039;&lt;&#039; not found in modules_native_addons.xml file\nError found: Start tag expected, &#039;&lt;&#039; not found in default_country_modules_list.xml file<\/code><\/pre><\/div><div class=\"cc-alert cc-alert-note\"><div class=\"cc-alert-title\">Note<\/div><div class=\"cc-alert-content\">These errors appear in PrestaShop 1.7 and PrestaShop 8.x. In older versions 1.6, the mechanism works similarly, although the location of some files may differ.<\/div><\/div><h6><br \/>Where does this error come from?<\/h6>PrestaShop sends HTTP requests to the PrestaShop Addons API to retrieve current module listings. An example endpoint looks like this:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>https:\/\/api.addons.prestashop.com\/?version=1.7.8.x&amp;method=listing&amp;action=must-have<\/code><\/pre><\/div>The store expects a response in XML format. The problem arises when:<ul><li>API Addons returns a response in a different format (e.g., JSON or an HTML error page).<\/li><li>Connection to the API is blocked by a firewall or server configuration<\/li><li>The shop server does not have access to external resources (no outgoing HTTP\/HTTPS traffic).<\/li><li>API Addons is temporarily unavailable or returning a timeout.<\/li><li>The PrestaShop version is too old and is no longer supported by the API<\/li><\/ul>PHP Parser <span class=\"cc-highlight\">simplexml_load_string()<\/span> when trying to process an incorrect response, it reports this exact error \u2013 <em>Start tag expected<\/em>.<br \/><br \/><h6><br \/>Does the error affect the store's operation?<\/h6><div class=\"cc-alert cc-alert-success\"><div class=\"cc-alert-title\">Success<\/div><div class=\"cc-alert-content\">The frontend of the store, shopping cart, orders, payments, and all purchasing processes are working normally. The error only concerns the admin panel \u2013 specifically the module management section.<\/div><\/div>What could stop working in the panel:<ul><li>list of recommended modules<\/li><li>\u201eMust-have\u201d section in the module manager<\/li><li>marketplace Addons accessible from the admin panel<\/li><li>Module suggestions for the country<\/li><li>Slower page loading Modules (timeout when trying to connect to the API)<\/li><\/ul><h6><br \/>Step 1 \u2013 Checking the XML file contents<\/h6>Before making any changes, it's worth checking what is currently in the files. By <a href=\"https:\/\/pl.wikipedia.org\/wiki\/Secure_Shell\" title=\"SSH\" target=\"_blank\" rel=\"noopener\">SSH<\/a> we perform<br \/><br \/><div class=\"cc-code-quote\"><pre><code>cat config\/xml\/must_have_modules_list.xml<\/code><\/pre><\/div>If the file is empty, contains HTML (e.g., a 503 error page) or JSON instead of XML, that is the source of the problem.<br \/><br \/><div class=\"cc-alert cc-alert-tip\"><div class=\"cc-alert-title\">Tip<\/div><div class=\"cc-alert-content\">You can also use the file manager in the hosting panel (e.g., Hestia CP, cPanel) or an FTP client to check the file contents \u2013 SSH access is not required.<\/div><\/div><h6><br \/>Step 2 \u2013 replacing files with the correct XML<\/h6>The fastest solution is to replace the content of the problematic files with minimal, correct XML. Via SSH, we execute:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>echo '' &gt; config\/xml\/must_have_modules_list.xml\necho '' &gt; config\/xml\/modules_native_addons.xml\necho '' &gt; config\/xml\/default_country_modules_list.xml\necho '' &gt; config\/xml\/trusted_modules_list.xml<\/code><\/pre><\/div>You can also upload files manually via FTP. The content of each file should look like this:<br \/><br \/><div class=\"cc-code-quote\"><pre><code><\/code><\/pre><\/div><div class=\"cc-alert cc-alert-warning\"><div class=\"cc-alert-title\">Warning<\/div><div class=\"cc-alert-content\">Simply replacing the files will only temporarily solve the problem. PrestaShop will try to fetch data from the API again the next time the modules page is refreshed and might overwrite the files with an erroneous response.<\/div><\/div><h6><br \/>Step 3 \u2013 Permanent Solution via Class Override<\/h6>To permanently block XML download attempts from the Addons API, we are creating a class override <span class=\"cc-highlight\">Tools<\/span>. We are creating a file:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>override\/classes\/Tools.php<\/code><\/pre><\/div>Regarding the following content:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>&lt;?php\nclass Tools extends ToolsCore\n{\n    protected static $is_addons_up = false;\n}<\/code><\/pre><\/div>Property <span class=\"cc-highlight\">$is_addons_up = false<\/span> causes PrestaShop not to attempt to connect to the Addons API \u2013 and consequently, it will not download or overwrite XML files.<br \/><br \/>After creating the override file, we clear the cache. For <strong>PrestaShop 1.7 \/ 8.x<\/strong>:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>rm -rf var\/cache\/dev\/*\nrm -rf var\/cache\/prod\/*<\/code><\/pre><\/div>You can also clear the cache from the administration panel: <strong>Advanced &gt; Performance &gt; Clear cache<\/strong>.<br \/><br \/><div class=\"cc-alert cc-alert-info\"><div class=\"cc-alert-title\">Info<\/div><div class=\"cc-alert-content\">After applying the override, the modules section still works fully \u2013 you can install, uninstall, and update modules from a ZIP file. Only the integration with the Addons marketplace in the admin panel is disabled.<\/div><\/div><h6><br \/>Alternative \u2013 blocking file writes<\/h6>If we don't want to use overrides, XML files can be set to read-only. PrestaShop won't be able to overwrite them:<br \/><br \/><div class=\"cc-code-quote\"><pre><code>chmod 444 config\/xml\/must_have_modules_list.xml\nchmod 444 config\/xml\/modules_native_addons.xml\nchmod 444 config\/xml\/default_country_modules_list.xml\nchmod 444 config\/xml\/trusted_modules_list.xml<\/code><\/pre><\/div><div class=\"cc-alert cc-alert-note\"><div class=\"cc-alert-title\">Note<\/div><div class=\"cc-alert-content\">The chmod method is simpler, but it doesn't eliminate API connection attempts - PrestaShop will still perform them, which can slow down module page loading. Overriding the Tools class is a technically cleaner solution.<\/div><\/div><h6><br \/>What don't we lose after disabling the Addons API?<\/h6>It's worth knowing that in a production environment, most of these features are not used on a daily basis anyway:<br \/><br \/><table class=\"woocommerce-table shop_table\"><thead><tr><td><strong>Function<\/strong><\/td><td><strong>After the API is disabled<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Online store frontend<\/td><td>It works without changes<\/td><\/tr><tr><td>Orders and Cart<\/td><td>It works without changes<\/td><\/tr><tr><td>Installing modules from ZIP<\/td><td>It works without changes<\/td><\/tr><tr><td>Module updates<\/td><td>It works without changes<\/td><\/tr><tr><td>Marketplace Addons in Admin<\/td><td>Unavailable<\/td><\/tr><tr><td>Must-have module recommendations\u201e<\/td><td>Unavailable<\/td><\/tr><tr><td>Module suggestions for the country<\/td><td>Unavailable<\/td><\/tr><\/tbody><\/table><br \/><h6>When can the error reoccur?<\/h6>If we only apply file replacement without override or chmod, the error may return after:<br \/><br \/><ul><li>refreshing the Module Manager page<\/li><li>PrestaShop cron job execution<\/li><li>PrestaShop updates<\/li><li>clearing the cache<\/li><\/ul>Therefore, we recommend combining both steps \u2013 file replacement <strong>i<\/strong> Override class or write-protect.<br \/><br \/><h6>Summary<\/h6>The XML error in the PrestaShop back office is a communication issue between an old version of the store and the Addons API \u2013 it is not a server failure, a database problem, or the presence of malware. The store is functioning normally. The solution is quick and does not require a PrestaShop update.<br \/><br \/>Recommended steps:<br \/><br \/><ol><li>Checking file contents in <span class=\"cc-highlight\">config\/xml\/<\/span><\/li><li>Replace files with minimal valid XML<\/li><li>Add class override <span class=\"cc-highlight\">Tools<\/span> z <span class=\"cc-highlight\">$is_addons_up = false<\/span><\/li><li>Clearing PrestaShop cache<\/li><\/ol>If you need help implementing the above changes or would like to conduct a technical audit of your store at the same time, we'd be happy to assist.<br \/><br \/><a class=\"button\" href=\"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/contact\/\" title=\"Contact Us\">Contact us<\/a>","protected":false},"excerpt":{"rendered":"Is the PrestaShop module manager throwing an XML error? Below, we explain why this happens and how to effectively fix it \u2013 without needing to update your store or make changes to the database.","protected":false},"author":1,"featured_media":6220,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"powered_cache_disable_cache":false,"powered_cache_disable_css_optimization":false,"powered_cache_disable_js_optimization":false,"footnotes":""},"categories":[137,135],"tags":[344,346,345,143],"class_list":["post-6207","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prestashop","category-baza-wiedzy","tag-blad-xml","tag-modules_native_addons-xml","tag-must_have_modules_list-xml","tag-prestashop"],"_links":{"self":[{"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/posts\/6207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/comments?post=6207"}],"version-history":[{"count":0,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/posts\/6207\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/media\/6220"}],"wp:attachment":[{"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/media?parent=6207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/categories?post=6207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iarina029.supserv.cozmoslabs.com\/en\/wp-json\/wp\/v2\/tags?post=6207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}