Exported products .csv file does not appear

This article provides a solution for the issue where exporting the desired entity type to a .csv file in the Commerce Admin results in the file not appearing.

Affected products and versions

Issue

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.

  1. In the Admin, navigate to System > Data Transfer > Export.

    magento_export_products_2.3.4.png

  2. Select

    • Entity Type: The entity you wish to export
    • Export File Format: CSV
    • Field Enclosure: leave unchecked.
  3. Click Continue.

  4. The following message is displayed: “Message is added to queue, wait to get your file soon”.

Expected result

The .csv file containing the exported desired entity type is displayed in the grid within a couple of minutes.

Actual result

The .csv file containing the exported desired entity type is not displayed in the grid in 10 minutes or more.

Cause

A known issue with the Export functionality in the Adobe Commerce application part version 2.3.2.

Solution

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

  1. In the Admin, navigate to Stores > Configuration > Advanced > Admin > Security.
  2. Set the Add Secret Key to URLs option to No.
  3. Click Save Config.
  4. 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 .magento.env.yaml file.

Add process as a cron job (optional)

  1. Make sure your cron is setup and configured. See Set up cron jobs for details.

  2. Run the following command to return a list of message queue consumers: ./bin/magento queue:consumers:list

  3. Add the following to your .magento.env.yaml file in the root application directory and include the consumers you would like to add. For example, here is the consumer required for export processing:

    code language-yaml
    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.

NOTE
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.
TIP
YAML files are case sensitive and do not allow tabs. Be careful to use consistent indentation throughout the .magento.env.yaml file or your configuration may not work as expected. The examples in the documentation and in the sample file use two-space indentation. Use the ece-tools validate command to check your configuration.
NOTE
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.
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a