0

I'm using Magento 2.3.3 on Ubuntu 18.04.

I'm having 141 000 products that I want to export to a CSV file. Nothing happens when I try to export. It just says

Message is added to the queue, wait to get your file soon

I tried to check the export process but the computer thinks forever. Not able to get file when i m try to use export

Is there another way to export?

1

Try to fix this way..

Open below file

vendor/magento/module-import-export/Controller/Adminhtml/Export/Export.php

and replace below function

public function execute()
{
    if ($this->getRequest()->getPost(ExportModel::FILTER_ELEMENT_GROUP)) {
        try {
            $params = $this->getRequest()->getParams();
            $model = $this->_objectManager->create(\Magento\ImportExport\Model\Export::class);
            $model->setData($this->getRequest()->getParams());
            $this->sessionManager->writeClose();

            return $this->fileFactory->create(
                $model->getFileName(),
                $model->export(),
                \Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR,
                $model->getContentType()
            );

            /** @var ExportInfoFactory $dataObject */
            $dataObject = $this->exportInfoFactory->create(
                $params['file_format'],
                $params['entity'],
                $params['export_filter']
            );

            $this->messagePublisher->publish('import_export.export', $dataObject);
            $this->messageManager->addSuccessMessage(
                __('Message is added to queue, wait to get your file soon')
            );
        } catch (\Exception $e) {
            $this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
            $this->messageManager->addError(__('Please correct the data sent value.'));
        }
    } else {
        $this->messageManager->addError(__('Please correct the data sent value.'));
    }
    /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
    $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
    $resultRedirect->setPath('adminhtml/*/index');
    return $resultRedirect;
}

Please don't forget to clear cache after change in files

5
  • Hi! I don't have that folder path. I have module-inventory-import-export. Am I missing some folders? – Nicklas Gilbertsson Mar 9 '20 at 7:38
  • @NicklasGilbertsson this path: vendor/magento/module-import-export/Controller/Adminhtml/Export/Export.php – Rakesh Donga Mar 9 '20 at 7:41
  • Hi thanks! I seems that those files doesn't exist in this project. – Nicklas Gilbertsson Mar 9 '20 at 7:48
  • 1
    @NicklasGilbertsson i think you missed because this file available in all version(prnt.sc/rdmk80) – Rakesh Donga Mar 9 '20 at 8:08
  • It works perfectly! :) – Nicklas Gilbertsson Mar 9 '20 at 8:42
0

First run the commands :-

If your var/importexportxxx file is blank try;

php bin/magento queue:consumers:start exportProcessor

https://github.com/magento/magento2/issues/23450

Other Second : -

php bin/magento cron:run

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.