After clearing magento cache got error Opening and ending tag mismatch: /Varien/Simplexml/Config.php

After clearing magento cache got error Opening and ending tag mismatch: /Varien/Simplexml/Config.php

October 14, 2026 · Illustrated author avatarBy Stefan Bogdanescu
After clearing magento cache got error Opening and ending tag mismatch: /Varien/Simplexml/Config.php

Solving the Magento XML Configuration Error

As an experienced Magento developer, I often encounter various errors when working on client projects or even while performing routine maintenance tasks like clearing cache. One of the most common issues I face is the “Opening and ending tag mismatch” error in the Varien/Simplexml/Config.php file.

Understanding the Error

The error message you’re seeing, Warning: simplexml_load_string(): Entity: line 82: parser error : Opening and ending tag mismatch, indicates an issue with the XML configuration file being loaded by Magento. In your case, the specific error is pointing to a problem with the two_columns_healthcare_video and two_columns_healthcare tags on lines 78 and 82 respectively.

Locating the Issue

The first step in resolving this issue is to identify the specific XML file causing the problem. The error message includes a path to the file being loaded: /home/mdmcomme/public_html/lib/Varien/Simplexml/Config.php.

However, since our focus is on the Magento configuration files, we should look for them within the app/code/core/Mage/ directory and its subdirectories.

Resolving the XML Configuration Error

1. Identifying the Problematic File

The error message suggests that the problem lies in a file loaded by the Mage_Core_Model_Config->loadModulesConfiguration() method, which is triggered during the Magento application initialization process (in app/code/core/Mage/Core/Model/Config.php).

To find the problematic XML file, you can check the configuration files located under app/code/core/Mage/ and look for any XML files with the mentioned tags (two_columns_healthcare_video and two_columns_healthcare).

2. Fixing the XML Syntax

Once you locate the problematic XML file (it might be a layout, theme, or module configuration file), open it in your favorite text editor or IDE.

The issue is likely due to a missing closing tag for one of these elements:

<two_columns_healthcare_video>...</two_columns_healthcare_video>
<two_columns_healthcare>...</two_columns_healthcare>

To fix the syntax error, ensure that every opening XML tag has its corresponding closing tag. If you’re unsure about the correct syntax or the purpose of these elements, consult the official Magento documentation for the specific module or theme.

3. Testing the Resolution

After making the necessary changes to the XML file and correcting the syntax errors, save the file and flush the Magento cache again:

rm -rf var/cache/*

Now, try accessing your Magento site once more. If you have resolved the issue, the error should disappear, and your store should load without any problems.

Best Practices for Avoiding XML Configuration Errors

To minimize the chances of encountering such errors in the future, consider implementing these best practices:

  1. Always validate your custom XML configuration files using a proper XML validator tool before deploying them to your production environment.
  2. Be cautious when modifying system-generated XML files; instead, create custom layout updates or use Magento’s built-in configuration management features.
  3. Keep your Magento installation up-to-date with the latest security patches and performance improvements.

Conclusion

Resolving the “Opening and ending tag mismatch” error in Magento involves identifying the problematic XML file, fixing the syntax issue, and ensuring proper cache clearing.

Remember that Magento is highly modular, and errors can originate from various sources, including custom themes, extensions, or even core files. Always approach such issues with a systematic troubleshooting mindset, and don’t hesitate to consult the official documentation or seek help from experienced developers when needed.

For more in-depth guides on Magento development and best practices, visit [https://laravelcompany.com/magento-development-blogs] for valuable resources and expert insights.

Cache Extensions Configuration Errors

Our network