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.
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.
Select
Click Continue.
The following message is displayed: “Message is added to queue, wait to get your file soon”.
Expected result
The .csv file with the exported products is displayed in the grid in a couple of minutes.
Actual result
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:
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.
bash bin/magento cache:clean
or in the Admin.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 .magento.env.yaml
file.
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: ./bin/magento queue:consumers:list
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:
stage:
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
max_messages: 1000
consumers:
- exportProcessor
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.