Closed
Description
Preconditions
- Install Magento 2.x
- Create custom module
Steps to reproduce
- Create a widget.xml in your custom module and add a widget
- Create a parameter (field) inside parent tag
widgets>widget>parameters
with a<depends>
tag, making it depend on the value of two other parameters as follows:
<parameter name="myfield" xsi:type="text" required="true" visible="true">
<label translate="true">Example</label>
<depends>
<parameter name="dependency_one" value="1"/>
<parameter name="dependency_two" value="1"/>
</depends>
</parameter>
Expected result
- The field should be shown only when both dependencies are met
Actual result
Way to fix
Update magento/module-widget/etc/widget.xsd
and magento/module-widget/etc/widget_file.xsd
In the bottom of the files change this:
<xs:complexType name="dependsType">
<xs:annotation>
<xs:documentation>List of parameters this parameter depends on.</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name="parameter" type="dependsParameterType" />
</xs:all>
</xs:complexType>
Into this:
<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>
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release