1

I'm having a problem with config values being locked in the Magento 2 admin.

I've seen that this can happen when you dump the config, but I didn't do that.

When, You dump it's supposed to update the config.php, but my config.php has no settings entries, only module enable/disable flags.

bin/magento app:config:import returns back Nothing to import.

Something broke and I can't undo it. This only seems to be happening for the Default Scope, and it's not all settings, only the Store Email Addresses settings. We configured them once, now I can't get back in and change them.

HELP!

1

2 Answers 2

3

"dawhoo" was on to something, but it had nothing to do with the DB info. That config file (app/etc/env.php) contains config settings of a sensitive nature and is the place where sensitive config values are dumped if you do an export. After I inadvertently dumped all settings and locked them all, I recovered by removing the exported values from the app/etc/config.php file. However, the sensitive ones were exported to app/etc/env.php, which I was not aware of. We use git for deployments and it's advised NOT to have app/etc/env.php in git, so I didn't even notice the change to the file.

2
  • Both are correct answer, most info does not mention env.php though.
    – Joel Davey
    Oct 20, 2019 at 15:47
  • You saved my day!
    – Dyin
    Mar 1, 2020 at 10:49
3

open config.php file from app/etc/config.php location.

Now remove everything from this file except - modules array like below code :

return array [
    'modules' => array [
        'Magento_Store' => 1,
        'Magento_AdminNotification' => 1,
        ...
        ...
        ...
    ],
];

then save this file !!

now after saving this file you need to run below command :

php bin/magento s:up

php bin/magento s:d:c

php bin/magento c:f

you don't required to do import for the same , if you just wanted to unlocked this settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.