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
Widget parameter depends does not work on specified block #6868
Comments
It's also an issue in Magento 2.1.2. And, in my opinion, it is not important which block class you use, as this is a general issue with all parameters of In #5443, you find detailed info of the expected/actual for the problem ( |
@LordHansolo, thank you for your report. |
What will be the expected fix timeframe? It is quite confusing that all depend labels are still shown. |
Hello, |
In my case, the problem was that the selected rowElement was the child of the rowElement that was supposed to be hidden. I added the following piece of code to fix this to
I am currently looking for a better solution. |
Hi @sergey-solo. Thank you for working on this issue.
|
For the impatient here is a fix: https://magento.stackexchange.com/questions/176091/magento-2-depends-is-not-working-in-widget-xml. Make sure you consider the first comment as the require-config.js is placed in the wrong directory. I can confirm it works fine on 2.2.9. |
I can confirm this issue is still present in 2.3.3. Fix from @OvalMedia works but I really don't like copying a gigantic javascript and appending 3 lines. This is not very future (= maintainable) proof. |
Here's a solution which seems to work in our case, it's strongly based on the stackexchange proposal but drops the original PrototypeJS implementation and uses jQuery all the way now: #30570 |
Hi @LordHansolo. Thank you for your report. The fix will be available with the upcoming 2.4.2 release. |
@magento-engcom-team @sidolov @ihor-sviziev the corresponding pull request is merged, but the fix does not cover all possible cases. 2 additional cases are described in the comments to the pull request #30570 |
MC-32830: Do not store admin and customer tokens in DB
Preconditions
Steps to reproduce
<parameter name="catalog_url" xsi:type="block" visible="true" required="true" sort_order="33"> <label translate="true">Category</label> <depends> <parameter name="enable_url" value="1" /> <parameter name="target_url" value="1" /> </depends> <block class="Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser"> <data> <item name="button" xsi:type="array"> <item name="open" xsi:type="string" translate="true">Select Category...</item> </item> </data> </block> </parameter>
It is important to use block class="Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser" or block class="Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser".
Expected result
Our Parameter disappears, if conditions set on depends are not met.
Actual result
Parameter is visible anyway.
The text was updated successfully, but these errors were encountered: