Hi all -
I am attempting to configure the settings in AtoM (v2.4) via Ansible script, after the initial installation. So, I'd like to have a script that automatically sets the site title, default URL, and any other customized settings I want. I've been unsuccessful using SQL from the command line or using PHP from the symfony tools:run command.
I can connect to the MySQL atom database, locate the appropriate setting (in the setting_i18n table), and modify the value. However, at that point, AtoM doesn't seem to recognize the change in the database. For example, changing the value for the default repository browse view (id = 124) between 'card' and 'table' doesn't seem to affect that page as displayed in the browser (after reloading). I've tried clearing the cache and restarting both PHP-FPM and Nginx, but the edited setting isn't reflected in the UI.
If I browse to the AtoM Settings page, the edited value appears correctly. If I click the "Save" button from the Settings page, the edited value seems to take effect. Is there a way to trigger AtoM to re-read the settings from the database without the manual intervention of clicking the "Save" button?
An alternative I tried was to run a script via the symfony tools:run command. I modeled my script very closely on some of the migrations that introduced or changed settings (e.g. atom/lib/task/migrate/migrations/arMigration0124.class.php). I was unsuccessful in getting an external PHP script to change a setting. Is there a sample external PHP script that I can reference, to make sure I'm on the right track?
Any other suggestions or approaches?
Thanks for your help,
Paul