-
Notifications
You must be signed in to change notification settings - Fork 9.4k
feat: more informative error message on xml validation errors #36836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: more informative error message on xml validation errors #36836
Conversation
|
Hi @adamzero1. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
Nice! However, there was already another improvement made in this area recently I believe: #36239 (it looks like this one is not going to be included in Magento 2.4.6, because it's not in 2.4.6-beta5, and that would really suck, so we'll have to wait until the year 2024 for this one to be included in Magento 2.4.7 ...) Anyway, not sure if we need both improvements? |
ihor-sviziev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also please cover your change with any type of automated tests?
|
@magento run all tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Co-authored-by: Ihor Sviziev <[email protected]>
Co-authored-by: Ihor Sviziev <[email protected]>
I'm not sure of the performance implications of merging on everyfile, considering the number of files that are processed. |
|
Regarding my previous comment, I just ran into a situation where I needed more info to see where an xml error came from exactly and the fix from #36239 didn't help in this particular case, but the fix from this PR did! So I think both should be processed. |
|
@magento run all tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
ihor-sviziev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also please cover your change with any type of automated tests and fix failing tests?
|
@magento run all tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
|
@magento create issue |
|
@magento run Functional Tests EE , Functional Tests CE |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
|
@magento run Functional Tests B2B |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
|
@magento run Unit Tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
|
@magento run Unit Tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
|
Functional Failure are not related to the PR changes. |
|
@magento run all tests |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
|
@magento run WebAPI Tests,Unit Tests,Integration Tests,Functional Tests EE |
|
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |







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 (*)
Resolved issues: