1

On mass edit action i got these error. what i miss there?

view/adminhtml/ui_component/test_test_listing.xml

<action name="edit">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">edit</item>
                        <item name="label" xsi:type="string" translate="true">Edit</item>
                        <item name="callback" xsi:type="array">
                            <item name="provider" xsi:type="string">test_index_listing.test_index_listing.test_index_columns_editor</item>
                            <item name="target" xsi:type="string">editSelected</item>
                        </item>
                    </item>
                </argument>
            </action>

Error

editor.js (line 532, col 20)
TypeError: this.selections(...) is undefined


return this.selections().getPageSelections();
2
  • your xml file name is listing.xml or any other name? May 6, 2016 at 7:07
  • it is in view/adminhtml/ui_component/test_test_listing.xml May 6, 2016 at 7:09

2 Answers 2

2

Problem was with these two lines

 <item name="provider" xsi:type="string">test_test_columns.test_test_columns.listing_top.bookmarks</item>
 <item name="selectProvider" xsi:type="string">test_test_columns.test_test_columns.news_index_columns.ids</item>

solution

<columns name="news_index_columns">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="storageConfig" xsi:type="array">
                    <item name="provider" xsi:type="string">test_test_listing.test_test_listing.listing_top.bookmarks</item>
                    <item name="namespace" xsi:type="string">current</item>
                </item>
                <item name="editorConfig" xsi:type="array">
                    <item name="selectProvider" xsi:type="string">test_test_listing.test_test_listing.news_index_columns.ids</item>
                    <item name="enabled" xsi:type="boolean">true</item>
                    <item name="indexField" xsi:type="string">id</item>
                    <item name="clientConfig" xsi:type="array">
                        <item name="saveUrl" xsi:type="url" path="news/index/inlineEdit"/>
                        <item name="validateBeforeSave" xsi:type="boolean">false</item>
                    </item>
                </item>
              </item>
        </argument>
    </columns>
1

keep below code and remove var, try again,

<action name="edit">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="type" xsi:type="string">edit</item>
                            <item name="label" xsi:type="string" translate="true">Edit</item>
                            <item name="callback" xsi:type="array">
                                <item name="provider" xsi:type="string">test_test_listing.test_test_listing.test_index_columns_editor</item>
                                <item name="target" xsi:type="string">editSelected</item>
                            </item>
                        </item>
                    </argument>
                </action>
3
  • thanks but i got the solution. May 6, 2016 at 7:27
  • whats the issue? May 6, 2016 at 7:29
  • i was using test_test_columns in the place on test_test_listing May 6, 2016 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.