-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Mass Actions with Childs don't work in CMS #9854
Comments
@bvboas Changing page and blocks status happens from the grid column. Pagers are different from Products |
Hi @tkacheva , Changing status was an example of a possible mass actions with children elements we would like to add. We want to select a few or all blocks/pages and duplicate them or copying them to another store view. The process would be: Select the desired pages, go to the actions menu, choose "Copy to Store View" and then in a submenu list the existing store views. That is currently not achievable Thanks |
Hi, @bvboas. There is just one tweak you need to make. Swap out the default MassActions component ( So, the resulting config will look like the following: <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/tree-massactions</item>
</item>
</argument>
<action name="status">
<!-- ... -->
</action>
</massaction>
</listingToolbar>
</listing> |
@que-etc Thanks. That did it. |
I spoke too soon ... If you have two items in the dropdown that have childrens and you click on the second, the displayed confirmation message and post params will be from the first one. Steps to reproduce the error
<action name="assign_to_group">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">assign_to_group</item>
<item name="label" xsi:type="string" translate="true">Assign a Customer Group</item>
</item>
</argument>
<argument name="actions" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Customer\Ui\Component\MassAction\Group\Options</argument>
<argument name="data" xsi:type="array">
<item name="urlPath" xsi:type="string">customer/index/massAssignGroup</item>
<item name="paramName" xsi:type="string">group</item>
<item name="confirm" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Assign a Customer Group</item>
<item name="message" xsi:type="string" translate="true">Are you sure to assign selected customers to new group?</item>
</item>
</argument>
</argument>
</action>
<action name="assign_to_group_duplicated">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">assign_to_group_duplicated</item>
<item name="label" xsi:type="string" translate="true">Assign a Customer Group Duplicated</item>
</item>
</argument>
<argument name="actions" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Customer\Ui\Component\MassAction\Group\Options</argument>
<argument name="data" xsi:type="array">
<item name="urlPath" xsi:type="string">customer/index/massAssignGroup</item>
<item name="paramName" xsi:type="string">group</item>
<item name="confirm" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Assign a Customer Group Duplicated</item>
<item name="message" xsi:type="string" translate="true">Are you sure to assign selected customers to new group Duplicated?</item>
</item>
</argument>
</argument>
</action>
ResultWhen clicking on the child elements from the duplicated massAction, the message that shows up is from the first massAction |
Yep, I can confirm it. I'll create an internal ticket. Thanks! |
Internal tickets MAGETWO-70294 / MAGETWO-70295. |
@bvboas So, I've found out what causes this bug. It happens when some actions have the same value of the <action name="actions_name">
<!-- ... -->
<argument name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<item name="type" xsi:type="string">enable</item>
<item name="label" xsi:type="string" translate="true">Enable</item>
</item>
<item name="1" xsi:type="array">
<item name="type" xsi:type="string">disable</item>
<item name="label" xsi:type="string" translate="true">Disable</item>
</item>
</argument>
</action>
<action name="actions_name_duplicated">
<!-- ... -->
<argument name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<!-- action with the type "enabled" is already present in the parallel node -->
<item name="type" xsi:type="string">enable</item>
<item name="label" xsi:type="string" translate="true">Enable</item>
</item>
<item name="1" xsi:type="array">
<item name="type" xsi:type="string">disable</item>
<item name="label" xsi:type="string" translate="true">Disable</item>
</item>
</argument>
</action> Thus, as a makeshift solution until we deliver the fix, you can ensure that all actions have a unique type value. |
@que-etc thanks. added a workaround and works. |
Fixed issues: - MAGETWO-57995 [GITHUB] Simple product videos display the thumbnail image rather than the embedded video player. #6360 - MAGETWO-57070 [GitHub] Locale\Format throws away country part, results in wrong number format #5073 - MAGETWO-69854 Can't set allowed or default currencies using config:set command - MAGETWO-66627 [GitHub] Default Post Code is applied for all Order's addresses if zip is not required - MAGETWO-66906 Deprecate setup:store-config:set command - MAGETWO-67274 Can't set value using config:set on uninstalled instance - MAGETWO-70294 [GitHub] Mass Actions with Childs don't work in CMS #9854 - MAGETWO-70216 Remove section i18n from shared file (config.php) - MAGETWO-59514 Hard coded "tax_region_id" in the \Magento\Tax\Setup\InstallData
@bvboas, thank you for your report. |
When we try to add a new option in Mass Actions for CMS pages and blocks, child options do not work as expected.
When in Catalog/Products we can choose "Actions/Change Status" and than two items appear "Enable/Disable".
We cannot replicate this behavior in CMS pages/blocks.
Preconditions
Steps to reproduce
Expected result
Actual result
###Additional Info
Tested in a Magento app skeleton
The text was updated successfully, but these errors were encountered: