[Issue] feat: more informative error message on xml validation errors #37788
Labels
Area: UI Framework
Component: Logger
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P2
A defect with this priority could have functionality issues which are not to expectations.
Progress: done
Reported on 2.4.x
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Projects
This issue is automatically created based on existing pull request: #36836: feat: more informative error message on xml validation errors
Description (*)
This PR adds more informative output to the existing error message displayed, when there is invalid XML configuration.
For example if there is invalid layout.xml the standard error message displayed to a developer would be something like:
This isn't very helpful as the line number refers to the XML after it has been merged, making it pretty impossible to determine the file that caused the issue.
This PR changes the output to
Which although the line numbers still refer to the merged XML, it will allow the developer to search the source files for a more specific string. Making it much easier to find the source of the issue.
Related Pull Requests
https://github.com/magento-gl/magento2ee/pull/205
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
<bar>foo</bar>
You should get an error message that you can use to find the offending configuration.
Questions or comments
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: