Skip to content

Mass Actions with Childs don't work in CMS #9854

Closed
@bvboas

Description

@bvboas

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

  1. Magento 2.1.6

Steps to reproduce

  1. create a file cms_block_listing.xml in view/adminhtml/ui_component/
  2. Example:
<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">
            <action name="status">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">status</item>
                        <item name="label" xsi:type="string" translate="true">Change status</item>
                    </item>
                </argument>
                <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 name="url" xsi:type="url" path="catalog/product/massStatus">
                            <param name="status">1</param>
                        </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 name="url" xsi:type="url" path="catalog/product/massStatus">
                            <param name="status">2</param>
                        </item>
                    </item>
                </argument>
            </action>
        </massaction>
    </listingToolbar>
</listing>
  1. Flush cache

Expected result

  1. Choose the option "Enable / Disable"

Actual result

  1. Form is submitted

###Additional Info
Tested in a Magento app skeleton

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedProgress: done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions