cancel
Showing results for 
Search instead for 
Did you mean: 

"Please correct the XML data and try again." error

"Please correct the XML data and try again." error

Hello,

 

This appears in system.log:

 

[2016-03-16 14:29:24] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_56f1b068ec7ccf4878f9284dd1137afd1: Please correct the XML data and try again. [] []

 

That causes payment methods don't appear in checkout page. How can I discover the real problem?

 

Thanks

Jaime

4 REPLIES 4

Re: "Please correct the XML data and try again." error

Use a proper tool for editing and validating the XML files.

How to validate Magento 2 XML files with IntelliJ IDEA or PhpStorm: https://mage2.pro/t/249

Re: "Please correct the XML data and try again." error

That is clear, but I need to know which XML has the problem first.

 

However, when an XML has invalid syntax, a PHP Exception is thrown. I jnow that because I have had the case before.

 

In this particular case, the XML's are well formed. The problem is that XML's has invalid data. No tool will be capable to validate such XMLs conforming to what Magento expects.

 

Regards

Jaime

Re: "Please correct the XML data and try again." error

Magento 2 validates all the XML data with schemas (XSD), and IntelliJ IDEA / PhpStorm does the same too.

Re: "Please correct the XML data and try again." error

The OP is correct however - this error is thrown for valid XML.

 

I've got the XSDs all connected, and I'm getting this error - but there are no errors nor warnings in PhpStorm.