3

On a couple of my own extensions and some that are not my own, I've seen that the extension settings go missing immediately upon upgrading the extension. These extensions all define settings metadata in a php file a la hook_civicrm_alterSettingsFolders() (e.g. https://github.com/twomice/com.joineryhq.activityical/issues/27)

It's not just that the setting values are cleared; rather, the settings themselves are uknown to CiviCRM. This is evident when viewing the Settings page for the extension; if that extension settings page is built dynamically using the Settings API to build the list of settings fields for that form, the form will contain no fields at all, because the Settings API finds no settings.

The workaround for this situation is to clear CiviCRM caches (e.g., run cv flush or use Administer > System Settings > Cleanup Caches and Update Paths). After doing that, the settings are once again available, although unfortunately their values have been cleared and must be reset.

Extensions where I've seen this recently:

Is anyone else seeing similar behavior, and are you aware of a cause, a fix, or something extension devs can do to avoid this issue?

2 Answers 2

0

This is a known issue with a fix in the works - see Github PR#13551.

0
0

I have not experienced this yet @twomice. I tend to use Civi::settings()->set as well in my upgrader and/or config file in my extension too, perhaps that might help?

2

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.