0

Totally confused, I can't able to edit any field from Store-> Configuration

Locked (grayed out) fields

enter image description here

env.php:

<?php return [ 'system' => [ 'default' => [ 'payment' => [ 'payflowpro' => [ 'partner' => null, 'user' => null, 'pwd' => null, 'sandbox_flag' => null, 'proxy_host' => null, 'proxy_port' => null, 'debug' => null ], 'payflow_link' => [ 'pwd' => null, 'sandbox_flag' => null, 'use_proxy' => null, 'proxy_host' => null, 'proxy_port' => null, 'debug' => null, 'url_method' => 'GET' ], 'payflow_express' => [ 'debug' => null ], 'paypal_express_bml' => [ 'publisher_id' => null ], 'paypal_express' => [ 'debug' => null, 'merchant_id' => null ], 'hosted_pro' => [ 'debug' => null ], 'paypal_billing_agreement' => [ 'debug' => null ], 'braintree' => [ 'merchant_id' => null, 'public_key' => null, 'private_key' => null, 'merchant_account_id' => null ], 'braintree_paypal' => [ 'merchant_name_override' => null ], 'checkmo' => [ 'mailing_address' => null ], 'payflow_advanced' => [ 'user' => null, 'pwd' => null, 'sandbox_flag' => null, 'proxy_host' => null, 'proxy_port' => null, 'debug' => null, 'url_method' => 'GET' ] ], 'payment_all_paypal' => [ 'paypal_payflowpro' => [ 'settings_paypal_payflow' => [ 'heading_cc' => null, 'settings_paypal_payflow_advanced' => [ 'paypal_payflow_settlement_report' => [ 'heading_sftp' => null ] ] ] ], 'payflow_link' => [ 'settings_payflow_link' => [ 'settings_payflow_link_advanced' => [ 'payflow_link_settlement_report' => [ 'heading_sftp' => null ] ] ] ], 'payments_pro_hosted_solution' => [ 'pphs_settings' => [ 'pphs_settings_advanced' => [ 'pphs_settlement_report' => [ 'heading_sftp' => null ] ] ] ], 'express_checkout' => [ 'settings_ec' => [ 'settings_ec_advanced' => [ 'express_checkout_settlement_report' => [ 'heading_sftp' => null ] ] ] ] ], 'paypal' => [ 'fetch_reports' => [ 'ftp_login' => null, 'ftp_password' => null, 'ftp_sandbox' => null, 'ftp_ip' => null, 'ftp_path' => null ], 'general' => [ 'business_account' => null, 'merchant_country' => null ], 'wpp' => [ 'api_username' => null, 'api_password' => null, 'api_signature' => null, 'api_cert' => null, 'sandbox_flag' => null, 'proxy_host' => null, 'proxy_port' => null ] ], 'admin' => [ 'url' => [ 'custom' => null, 'custom_path' => null ] ], 'web' => [ 'unsecure' => [ 'base_url' => 'http://localhost/mage2/', 'base_link_url' => '{{unsecure_base_url}}', 'base_static_url' => '{{secure_base_url}}pub/static/', 'base_media_url' => '{{secure_base_url}}pub/media/' ], 'secure' => [ 'base_url' => '{{unsecure_base_url}}', 'base_link_url' => '{{secure_base_url}}', 'base_static_url' => '{{secure_base_url}}pub/static/', 'base_media_url' => '{{secure_base_url}}pub/media/' ], 'default' => [ 'front' => 'cms' ], 'cookie' => [ 'cookie_path' => null, 'cookie_domain' => null ] ], 'catalog' => [ 'productalert_cron' => [ 'error_email' => null ], 'product_video' => [ 'youtube_api_key' => null ], 'search' => [ 'opensearch_server_hostname' => 'localhost', 'elasticsearch7_server_hostname' => 'localhost', 'opensearch_server_port' => '9200', 'elasticsearch7_server_port' => '9200', 'opensearch_index_prefix' => 'magento2', 'elasticsearch7_index_prefix' => 'magento2', 'opensearch_enable_auth' => '0', 'elasticsearch7_enable_auth' => '0', 'opensearch_username' => null, 'elasticsearch7_username' => null, 'opensearch_password' => null, 'elasticsearch7_password' => null, 'opensearch_server_timeout' => '15', 'elasticsearch7_server_timeout' => '15' ] ], 'cataloginventory' => [ 'source_selection_distance_based_google' => [ 'api_key' => null ] ], 'currency' => [ 'import' => [ 'error_email' => null ] ], 'sitemap' => [ 'generate' => [ 'error_email' => null ] ], 'trans_email' => [ 'ident_general' => [ 'name' => 'Owner', 'email' => '[email protected]' ], 'ident_sales' => [ 'name' => 'Sales', 'email' => '[email protected]' ], 'ident_support' => [ 'name' => 'CustomerSupport', 'email' => '[email protected]' ], 'ident_custom1' => [ 'name' => 'Custom 1', 'email' => '[email protected]' ], 'ident_custom2' => [ 'name' => 'Custom 2', 'email' => '[email protected]' ] ], 'contact' => [ 'email' => [ 'recipient_email' => '[email protected]' ] ], 'sales_email' => [ 'order' => [ 'copy_to' => null ], 'order_comment' => [ 'copy_to' => null ], 'invoice' => [ 'copy_to' => null ], 'invoice_comment' => [ 'copy_to' => null ], 'shipment' => [ 'copy_to' => null ], 'shipment_comment' => [ 'copy_to' => null ], 'creditmemo' => [ 'copy_to' => null ], 'creditmemo_comment' => [ 'copy_to' => null ] ], 'checkout' => [ 'payment_failed' => [ 'copy_to' => null ] ], 'carriers' => [ 'ups' => [ 'is_account_live' => '0', 'access_license_number' => null, 'gateway_xml_url' => 'https://onlinetools.ups.com/ups.app/xml/Rate', 'gateway_rest_url' => 'https://wwwcie.ups.com/api/rating/', 'password' => null, 'username' => null, 'gateway_url' => 'https://www.ups.com/using/services/rave/qcostcgi.cgi', 'shipper_number' => null, 'tracking_url' => 'https://onlinetools.ups.com/ups.app/xml/Track', 'tracking_rest_url' => 'https://wwwcie.ups.com/api/track/', 'debug' => null ], 'usps' => [ 'gateway_url' => 'https://production.shippingapis.com/ShippingAPI.dll', 'gateway_secure_url' => 'https://secure.shippingapis.com/ShippingAPI.dll', 'userid' => null, 'password' => null ], 'fedex' => [ 'account' => null, 'api_key' => null, 'secret_key' => null, 'sandbox_mode' => '0', 'production_webservices_url' => 'https://apis.fedex.com/', 'sandbox_webservices_url' => 'https://apis-sandbox.fedex.com/', 'smartpost_hubid' => null ], 'dhl' => [ 'id' => null, 'password' => null, 'account' => null, 'debug' => null, 'gateway_url' => 'https://xmlpi-ea.dhl.com/XMLShippingServlet' ] ], 'google' => [ 'analytics' => [ 'account' => null ], 'gtag' => [ 'analytics4' => [ 'measurement_id' => null ], 'adwords' => [ 'conversion_id' => null ] ] ], 'recaptcha_backend' => [ 'type_recaptcha' => [ 'public_key' => null, 'private_key' => null ], 'type_invisible' => [ 'public_key' => null, 'private_key' => null ], 'type_recaptcha_v3' => [ 'public_key' => null, 'private_key' => null ] ], 'recaptcha_frontend' => [ 'type_recaptcha' => [ 'public_key' => null, 'private_key' => null ], 'type_invisible' => [ 'public_key' => null, 'private_key' => null ], 'type_recaptcha_v3' => [ 'public_key' => null, 'private_key' => null ] ], 'system' => [ 'smtp' => [ 'host' => 'localhost', 'port' => '25' ], 'full_page_cache' => [ 'varnish' => [ 'access_list' => null, 'backend_host' => null, 'backend_port' => null ] ], 'release_notification' => [ 'content_url' => null, 'use_https' => '1' ] ], 'adobe_ims' => [ 'integration' => [ 'api_key' => null, 'private_key' => null ] ], 'dev' => [ 'restrict' => [ 'allow_ips' => null ], 'js' => [ 'session_storage_key' => 'collected_errors' ] ], 'newrelicreporting' => [ 'general' => [ 'api_url' => 'https://api.newrelic.com/v2/applications/%s/deployments.json', 'insights_api_url' => 'https://insights-collector.newrelic.com/v1/accounts/%s/events', 'account_id' => null, 'app_id' => null, 'api' => null, 'insights_insert_key' => null ] ], 'analytics' => [ 'general' => [ 'token' => null ], 'url' => [ 'signup' => 'https://advancedreporting.rjmetrics.com/signup', 'update' => 'https://advancedreporting.rjmetrics.com/update', 'bi_essentials' => 'https://dashboard.rjmetrics.com/v2/magento/signup', 'otp' => 'https://advancedreporting.rjmetrics.com/otp', 'report' => 'https://advancedreporting.rjmetrics.com/report', 'notify_data_changed' => 'https://advancedreporting.rjmetrics.com/report' ] ], 'crontab' => [ 'default' => [ 'jobs' => [ 'analytics_subscribe' => [ 'schedule' => [ 'cron_expr' => '0 * * * *' ] ], 'analytics_collect_data' => [ 'schedule' => [ 'cron_expr' => '00 02 * * *' ] ] ] ] ] ] ], 'backend' => [ 'frontName' => 'admin' ], 'remote_storage' => [ 'driver' => 'file' ], 'cache' => [ 'graphql' => [ 'id_salt' => 'sv7Nr3jZQVhaV6U1gneB8N9C2EFzNdgp' ], 'frontend' => [ 'default' => [ 'id_prefix' => 'ca3_' ], 'page_cache' => [ 'id_prefix' => 'ca3_' ] ], 'allow_parallel_generation' => false ], 'config' => [ 'async' => 0 ], 'queue' => [ 'consumers_wait_for_messages' => 1 ], 'crypt' => [ 'key' => 'base64W3DEUcytx+njxk/zh2mTLa007STERY6CcvxhrtlOKaU=' ], 'db' => [ 'table_prefix' => '', 'connection' => [ 'default' => [ 'host' => 'localhost', 'dbname' => 'mage2', 'username' => 'root', 'password' => '', 'model' => 'mysql4', 'engine' => 'innodb', 'initStatements' => 'SET NAMES utf8;', 'active' => '1', 'driver_options' => [ 1014 => false ] ] ] ], 'resource' => [ 'default_setup' => [ 'connection' => 'default' ] ], 'x-frame-options' => 'SAMEORIGIN', 'MAGE_MODE' => 'default', 'session' => [ 'save' => 'files' ], 'lock' => [ 'provider' => 'db' ], 'directories' => [ 'document_root_is_pub' => true ], 'cache_types' => [ 'config' => 1, 'layout' => 1, 'block_html' => 1, 'collections' => 1, 'reflection' => 1, 'db_ddl' => 1, 'compiled_config' => 1, 'eav' => 1, 'customer_notification' => 1, 'config_integration' => 1, 'config_integration_api' => 1, 'graphql_query_resolver_result' => 1, 'full_page' => 1, 'config_webservice' => 1, 'translate' => 1 ], 'downloadable_domains' => [ 'localhost' ], 'install' => [ 'date' => 'Tue, 11 Mar 2025 10:53:36 +0000' ] ]; 

3 Answers 3

0

That means these configuration values are locked in app/etc/env.php or app/etc/config.php files.

Please check more information here: https://experienceleague.adobe.com/en/docs/commerce-knowledge-base/kb/troubleshooting/miscellaneous/locked-fields-in-magento-admin

In order to unlock currency settings you will need to remove this lines from your env.php file:

'currency' => [ 'import' => [ 'error_email' => null ] ], 
8
  • config.php - Remove the setting and then redeploy. -> What they try to mention? What settings needs to be removed? Commented Apr 29 at 14:29
  • In your case - "Currency Options" settings. It looks like they are locked in the config file. And if you want to be able to edit them via admin, you need to "unlock" them = remove from config.php Commented Apr 29 at 21:18
  • Not only currency option, all the fields locked. Commented May 1 at 10:05
  • Would you mind sharing your app/etc/env.php and app/etc/config.php files? Commented May 1 at 13:15
  • @Snowcore I updated my post with env.php files, due to the post limitation i can't upload both env.php and config.php file, once you check env.php then i will upload config.php. Commented May 2 at 6:35
0

Magery response is fine, but to explicit more what you really want.

if you don't want any configuration being locked, what you need to do is update your file app/etc/config.php and remove everything except from system

As an example i'm showing you 2 config php file, on the left a project with some locked configuration, on the right no configuration is being locked.

So what you need to do is to remove all locked configuration is remove everything from the 'system' array on the left.

Lock is there to prevent admin user to update a config you don't want them to update. You can lock all the config, or just lock / unlock som of them.

sample

NB : Be careful the provided link by magery is made for Cloud.

If you really want the proper documentation for commerce you can find it there : https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/cli/configuration-management/set-configuration-values

Sensitive data like passwords are store in env.php it works the same way as config.php but as it's not versionized you shoudl'nt have issue with this one. Actually env.php is what should really be locked as you don't want passwords to be updated by someone by mistake

3
  • After i removed everything except from system in config.php i am getting following error: Can't run this operation: deployment configuration is absent. Run 'magento setup:config:set --help' for options. Commented May 6 at 12:37
  • FYP - and i am not change anything from env.php file. Commented May 6 at 12:38
  • That's weird this message is typical from what you have when your env.php or config php is missing or incorrect if it's the same before and after removing data from the config array...there shouldn't be any issue there. May be check if the two files config and env have the proper writtable rights for your magento instance. Commented May 7 at 9:57
0

This config locking happens when one runs the command:

php bin/magento app:config:dump 

To go back to normal you should:

  • remove 'system' => [....] from your app/etc/env.php. Make your app/etc/env.php look like this:

     <?php return [ 'backend' => [ 'frontName' => 'admin' ], 'remote_storage' => [ 'driver' => 'file' ], 'cache' => [ 'graphql' => [ 'id_salt' => 'sv7Nr3jZQVhaV6U1gneB8N9C2EFzNdgp' ], 'frontend' => [ 'default' => [ 'id_prefix' => 'ca3_' ], 'page_cache' => [ 'id_prefix' => 'ca3_' ] ], 'allow_parallel_generation' => false ], 'config' => [ 'async' => 0 ], 'queue' => [ 'consumers_wait_for_messages' => 1 ], 'crypt' => [ 'key' => 'base64W3DEUcytx+njxk/zh2mTLa007STERY6CcvxhrtlOKaU=' ], 'db' => [ 'table_prefix' => '', 'connection' => [ 'default' => [ 'host' => 'localhost', 'dbname' => 'mage2', 'username' => 'root', 'password' => '', 'model' => 'mysql4', 'engine' => 'innodb', 'initStatements' => 'SET NAMES utf8;', 'active' => '1', 'driver_options' => [ 1014 => false ] ] ] ], 'resource' => [ 'default_setup' => [ 'connection' => 'default' ] ], 'x-frame-options' => 'SAMEORIGIN', 'MAGE_MODE' => 'default', 'session' => [ 'save' => 'files' ], 'lock' => [ 'provider' => 'db' ], 'directories' => [ 'document_root_is_pub' => true ], 'cache_types' => [ 'config' => 1, 'layout' => 1, 'block_html' => 1, 'collections' => 1, 'reflection' => 1, 'db_ddl' => 1, 'compiled_config' => 1, 'eav' => 1, 'customer_notification' => 1, 'config_integration' => 1, 'config_integration_api' => 1, 'graphql_query_resolver_result' => 1, 'full_page' => 1, 'config_webservice' => 1, 'translate' => 1 ], 'downloadable_domains' => [ 'localhost' ], 'install' => [ 'date' => 'Tue, 11 Mar 2025 10:53:36 +0000' ]]; 
  • remove everything except modules array from app/etc/config.php

  • then run php bin/magento setup:upgrade followed by php bin/magento deploy:mode:set production

Report back if it solves your issue.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.