-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
2.3 Development: Clarify XSD for formElements allowed settings #15161
Merged
magento-engcom-team
merged 7 commits into
magento:2.3-develop
from
neillrobson:2.3-develop
May 17, 2018
Merged
2.3 Development: Clarify XSD for formElements allowed settings #15161
magento-engcom-team
merged 7 commits into
magento:2.3-develop
from
neillrobson:2.3-develop
May 17, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In an attempt to resolve #14140, new complex types have been defined for every UI component specified in `ui_settings.xsd` line 49 (valid attribute codes for "formElement"). These complex types only include the `<settings>` child node, along with any grandchildren that pertain specifically to that form element (no `abstractSettings`). Finally, `ui_configuration.xsd` has been updated with a new group holding these complex types, and the corresponding validation for the `<formElements>` tag references this new group rather than the existing, more general group.
I did a bit of code digging but couldn't figure out why the price component definition did not have any valid/configured child nodes for <settings> whatsoever. I decided that the best route would be to add blank groups with the proper labels, so that the actual validation results remain unchanged, but the skeleton now exists for future developers to add valid configuration.
I'm not sure if the solution proposed in this commit is correct, but I couldn't figure out any more logical way to deal with the validation errors on the Travis CI build. The error follows: 1) Magento\Test\Integrity\Xml\SchemaTest::testXmlFiles Passed: 1881, Failed: 6, Incomplete: 0, Skipped: 0. Data set: /app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml Error validating /home/travis/build/magento/magento2/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml against urn:magento:module:Magento_Ui:etc/ui_configuration.xsd Array ( [0] => Element 'fileUploader': This element is not expected. Expected is one of ( hidden, file, input, date, boolean, checkbox, checkboxset, email, select, multiselect ). Line: 168 [1] => Element 'wysiwyg', attribute 'class': The attribute 'class' is not allowed. Line: 206 ) Failed asserting that an array is empty. Element zero in that array is what I am attempting to fix here.
Without this part of the configuration, children of <formElements> nodes can not have their attributes (such as "class") configured.
Again, this error was discovered during the Travis CI build, specifically during validation of /app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml, line 275.
Hi, @RNanoware, thank you for collaboration. I will close PR to 2.2-develop. |
Hi @RNanoware. Looks like in Magento 2.3 we add |
@RNanoware thanks! |
Hi @RNanoware. Thank you for your contribution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In an attempt to resolve #14140, new complex types have been defined for every UI component specified in
ui_settings.xsd
line 49 (valid attribute codes for "formElement"). These complex types only include the<settings>
child node, along with any grandchildren that pertain specifically to that form element (noabstractSettings
). Finally,ui_configuration.xsd
has been updated with a new group holding these complex types, and the corresponding validation for the<formElements>
tag references this new group rather than the existing, more general group.Fixed Issues (if relevant)
Note: This pull request contains the same code changes and functionality from PR 14170, but this PR affects the
2.3-develop
branch rather than the old2.2-develop
branch.