Locked fields in Commerce Admin

This article provides a solution for when you cannot modify fields in the Commerce Admin.

Affected products and versions

  • Adobe Commerce on-premises 2.3.x, 2.4.x
  • Adobe Commerce on cloud infrastructure 2.3.x, 2.4.x

Issue

Once you have saved a change to your configuration to app/etc/env.php or app/etc/config.php, you cannot modify the setting in the Admin.

Steps to reproduce:

Note: This is an example - the issue can affect all configurations that have been saved.

  1. The merchant saves their delivery methods credentials using the following command in the terminal: ./vendor/bin/ece-tools config:dump. This saves the credentials in the app/etc/env.php file.
  2. The merchant then attempts to change the credentials later.

Expected results:

The merchant can set the values in the Admin field settings and save them.

Actual results:

The fields in the Admin are locked, or the values can be changed but will not save in the Admin.

Cause

When the configuration is saved to env.php or config.php, you will not be able to modify the setting in the Admin. To allow editing of the setting, you will have to remove the configuration from env.php or config.php.

Solution

Make sure that the configuration has not been saved to app/etc/env.php or app/etc/config.php. If it has been saved, try the following steps:

  • config.php - Remove the setting and then redeploy.
  • env.php - Modify this directly on the server and remove the setting, then run bin/magento app:config:import.
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a