Magento 2.3.2 Product Export Message: “Message is added to queue, wait to get your file soon”
-
15-04-2021 - |
Question
when i have product export and below message showing
Error: "Message is added to queue, wait to get your file soon"
Also i run cron command like
php bin/magento cron:run
still not downloading CSV file
i know here asking someone but this is not working for me
Any help would be appreciated.
Thanks.
Solution 2
Try to fix Following 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
OTHER TIPS
I have tried changed the code in the export.php file and it works. The pending issue is that the files available to download are not seen at another time. Is it possible to fix that error?
Disable the the Add Secret Key to URL option
- In the Magento Admin, navigate to Stores > Configuration > Advanced > Admin > Security.
- Set the Add Secret Key to URLs option to No.
- Click Save Config.
- Clean cache under System > Tools > Cache Management or by running bin/magento cache:clean or in Magento Admin.
To get the exported file, run the bin/magento queue:consumers:start exportProcessor command. After running this, the file should be displayed in the grid.