Exported products .csv file does not appear
This article provides a fix for the issue where you try to export products to a .csv file in the Commerce Admin, but the file does not appear.
Affected products and versions
Steps to reproduce
Prerequisites: The Add Secret Key to URLs option is set to Yes. The option is configured in the Commerce Admin under Stores > Configuration > Advanced > Admin > Security.
In the Admin, navigate to System > Data Transfer > Export.
- Entity Type: Products
- Export File Format: CSV
- Field Enclosure: leave unchecked.
The following message is displayed: "Message is added to queue, wait to get your file soon".
The .csv file with the exported products is displayed in the grid in a couple of minutes.
The .csv file with the exported products is not displayed in the grid in 10 minutes or more.
A known issue with the Export functionality in the Adobe Commerce application part version 2.3.2.
There are two possible solutions for the issue:
- Disable the Add Secret Key to URL option.
- Run the
bin/magento queue:consumers:start exportProcessor command manually, and optionally configure it to be run by cron.
See details for both options in the following paragraphs.
Disable the Add Secret Key to URL option
- In the 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
bash bin/magento cache:clean or in the Admin.
Run the export command manually and optionally add it as cron job
To get the export file, run the
bin/magento queue:consumers:start exportProcessor command. After running this, the file should be displayed in the grid.
To add the process as a cron job optionally, you must add the
CRON_CONSUMERS variable to the
Add process as a cron job (optional)
Make sure your cron is setup and configured. See Set up cron jobs for details.
Run the following command to return a list of message queue consumers:
Add the following to your
.magento.env.yaml file in the Magento
/app directory, and include the consumers you would like to add. For example, here is the consumer required for export processing:
Then push this updated file and redeploy your environment. Also reference Add custom cron jobs to your project in our developer documentation.
If you cannot find the
.magento.env.yaml file for your environment, and you think it was deleted, you need to create a new
.magento.env.yaml. It might be empty initially, you can add info there as required. Reference the following articles: Configure environment variables for deployment and Environment variables in our developer documentation.
On Adobe Commerce on cloud infrastructure Pro projects, the auto-crons feature must be enabled on your Adobe Commerce on cloud infrastructure before you can add custom cron jobs to Staging and Production environments using
.magento.app.yaml. If this feature is not enabled, create a support ticket, to have the job added for you.