adminhtml – So many admin-related checkboxes grayed/greyed out in ALL scopes

At some point when troubleshooting cron & message queue issues, I executed this command:

bin/magento app:config:dump

This command results in many configuration-related variables to be output to app/etc/config.php and app/etc/env.php, variables which normally are stored in the database and are normally configurable from within the admin panel. However, when these variables appear in these files – namely the large ‘system’=>( ) array which appears in config.php after executing that command – Magento will default to getting the configuration from this array rather than the settings in the database. Additionally it locks down the ability to make changes from within the admin panel.

To restore the ability to make changes from within the admin panel, resulting in the data that was previously stored in the database to be used once again, one needs simply to remove the ‘system’=>( ), followed by execution of the command:

bin/magento setup:upgrade

I confirmed that previously-stored data matches what is displayed in the admin panel after doing this (ie, the “hints” templatehint keyword displayed in the screenshot in the question still appears after removing system from config.php).

This is a good way to lock down specific settings to protect users – who might otherwise have the privileges – from mistakenly making changes. You can also import data from a previous file dump using:

bin/magento app:config:import