Locked (grayed out) fields in Commerce Admin
This article provides a solution for when you can’t modify locked (grayed out) fields in the Commerce Admin.
Description description
Environments
- Adobe Commerce on-premises 2.3.x, 2.4.x
- Adobe Commerce on cloud infrastructure 2.3.x, 2.4.x
Issue/Symptoms
Once you have saved a change to your configuration to app/etc/env.php or app/etc/config.php, you can’t modify the setting in the Admin.
Steps to reproduce:
Note: This is an example - the issue can affect all configurations that have been saved.
- 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 theapp/etc/env.phpfile. - 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 won’t save in the Admin.
Cause
When the configuration is saved to env.php or config.php, you won’t be able to modify the setting in the Admin. To allow editing of the setting, you’ll have to remove the configuration from env.php or config.php.
Resolution resolution
Make sure that the configuration hasn’t 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 runbin/magento app:config:import.
Related reading
- Export the Configuration in our developer documentation
- Set Configuration values in our developer documentation
- Adobe Commerce on cloud infrastructure: reduce deployment downtime with Configuration Management in our support knowledge base