1

We have created a grid in UI Component. While we have export data from grid we got an error like.

{"0":"Notice: Undefined index: attributes in \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/View\/Element\/UiComponentFactory.php on line 174","1":"#0 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/View\/Element\/UiComponentFactory.php(174): Magento\\Framework\\App\\ErrorHandler->handler(8, 'Undefined index...', '\/var\/www\/html\/b...', 174, Array)\n#1 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/View\/Element\/UiComponentFactory.php(206): Magento\\Framework\\View\\Element\\UiComponentFactory->argumentsResolver(NULL, Array)\n#2 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/module-ui\/Component\/MassAction\/Filter.php(76): Magento\\Framework\\View\\Element\\UiComponentFactory->create(NULL)\n#3 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/module-ui\/Model\/Export\/ConvertToCsv.php(60): Magento\\Ui\\Component\\MassAction\\Filter->getComponent()\n#4 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/module-ui\/Controller\/Adminhtml\/Export\/GridToCsv.php(72): Magento\\Ui\\Model\\Export\\ConvertToCsv->getCsvFile()\n#5 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/App\/Action\/Action.php(107): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv->execute()\n#6 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/module-backend\/App\/AbstractAction.php(229): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#7 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#8 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->___callParent('dispatch', Array)\n#9 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/module-backend\/App\/Action\/Plugin\/Authentication.php(143): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#10 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(135): Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(Object(Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#11 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#12 \/var\/www\/html\/bannerbuzzmagento2\/generated\/code\/Magento\/Ui\/Controller\/Adminhtml\/Export\/GridToCsv\/Interceptor.php(26): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->___callPlugins('dispatch', Array, NULL)\n#13 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/App\/FrontController.php(55): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#14 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#15 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)\n#16 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#17 \/var\/www\/html\/bannerbuzzmagento2\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, Array)\n#18 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/App\/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#19 \/var\/www\/html\/bannerbuzzmagento2\/vendor\/magento\/framework\/App\/Bootstrap.php(256): Magento\\Framework\\App\\Http->launch()\n#20 \/var\/www\/html\/bannerbuzzmagento2\/index.php(51): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http))\n#21 {main}","url":"\/bannerbuzzmagento2\/admin\/mui\/export\/gridToCsv\/key\/478137d7ab452ec87ffbf3c0613afcee2829081df81e1916da6734b91d554bd6\/?","script_name":"\/bannerbuzzmagento2\/index.php"}

While I am adding below tag in XML file then its working fine.

<selectionsColumn name="ids">
       <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="resizeEnabled" xsi:type="boolean">false</item>
                <item name="resizeDefaultWidth" xsi:type="string">55</item>
                <item name="indexField" xsi:type="string">id</item>
            </item>
        </argument>
    </selectionsColumn>

but I don't want to add a checkbox in the grid.

I have read some article where I found that we can give provider in export button but still it's not working.

<exportButton name="export_button">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="selectProvider" xsi:type="string">eoureport_hardware_listing.eoureport_hardware_listing_columns.ids</item>
            </item>
        </argument>
    </exportButton>

if anyone knows how we can resolve an issue.

0
<columns name="sales_order_columns">
    <selectionsColumn name="ids">
         <settings>
            <indexField>entity_id</indexField>
         </settings>
    </selectionsColumn>
</columns>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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