3

I have added ExportButton on admin product grid and when i click on export it shows error Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already declared.

I have added the button in

app/code/Mycompany/Gridexport/view/adminhtml/ui_component/product_listing.xml

<listingToolbar name="listing_top">
   <exportButton name="export_button">  
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="selectProvider" xsi:type="string">product_listing.product_listing.product_columns.ids</item>  
                </item>
            </argument>
    </exportButton> 
</listingToolbar>

But When i click on export button I get following error

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already declared.

Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already declared. generated/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection/Interceptor.php(973): Magento\Eav\Model\Entity\Collection\AbstractCollection->joinField('qty', 'cataloginventor...', 'qty', 'product_id=enti...', '{{table}}.stock...', 'left') vendor/magento/module-catalog-inventory/Ui/DataProvider/Product/AddQuantityFieldToCollection.php(27): Magento\Catalog\Ui\DataProvider\Product\ProductCollection\Interceptor->joinField('qty', 'cataloginventor...', 'qty', 'product_id=enti...', '{{table}}.stock...', 'left') vendor/magento/module-catalog/Ui/DataProvider/Product/ProductDataProvider.php(91): Magento\CatalogInventory\Ui\DataProvider\Product\AddQuantityFieldToCollection->addField(Object(Magento\Catalog\Ui\DataProvider\Product\ProductCollection\Interceptor), 'qty', NULL) generated/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider/Interceptor.php(37): Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider->addField('qty', NULL)

  • Did you got the solution? – Avesh Naik Jul 19 at 8:07

Your Answer

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

Browse other questions tagged or ask your own question.