MAGETWO-75743: Fix for #9783 Multiple <depends> parameters in widget.…#11495
MAGETWO-75743: Fix for #9783 Multiple <depends> parameters in widget.…#11495magento-team merged 1 commit intomagento:2.2-developfrom diazwatson:9783_MultipleDependsParametersNotAllowedInWidget
Conversation
…xml not allowed
|
@diazwatson Now there are no fatal errors, but multiple depends node does not work as expected.
Expected Result:
Actual Result:
NotesThe script is generated correctly, but does not seem to work as this PR expects: |
|
I'll check |
|
Are you sure you have to modify the Javascript for this? I have been using just the XML fix I've proposed in my initial bug report, which seems to do the trick. <xs:complexType name="dependsType">
<xs:annotation>
<xs:documentation>List of parameters this parameter depends on.</xs:documentation>
</xs:annotation>
<xs:sequence maxOccurs="unbounded" minOccurs="1">
<xs:element name="parameter" type="dependsParameterType" />
</xs:sequence>
</xs:complexType>The main difference I see here compared to your pull request is the minOccurs="1". Not sure if that matters though |
|
@milansimek the PR does not change the javascript; just point out that javascript generates correctly, but it does not work as expected. Try to follow my steps, you'll see that it's not enough to change the xml. |
|
@vrann Ah yes, sorry about that. I'm a bit tired. I'll check to see how I did it in our custom extension and will report back here |
|
@vrann I just tested in Magento 2.1.6: Works fine when just using the XML fix I proposed. Should work also in 2.2 I guess but if you want I can double check for you. Please note that I did not apply the changes from the pull request to the following file when testing: |
|
@milansimek thanks, re-tested again and it works as expected |
|
@vrann should I revert changes in |
…ters in widget.… #11495

Description
Allow multiple depends parameters to be allowed in
widget.xml.Fixed Issues (if relevant)
Manual testing scenarios
widget.xmlin your custom module and add a widget,widgets>widget>parameterswith a<depends>tag, making it depend on the value of two other parameters as follows:Expected result
The field should be shown only when both dependencies are met
Contribution checklist