- Issue created by @gxleano
- Merge request !526Issue #3513359: Add Tagify settings to admin_ui and content_type_base recipes โ (Merged) created by gxleano
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
This is looking good to me, the only suggestion is to add an update hook to the next release of the tagify module which sets the default value for existing sites.
- ๐ช๐ธSpain gxleano Cรกceres
Thanks Jurgen for the quick feedback!
The goal is to set
set_default_widget
toTRUE
in Drupal CMS, which will be implemented through this issue. Given this, I donโt see the need for the hook.In the Tagify module itself, I would keep the option set to
FALSE
, allowing users to decide whether to enable it as the default.But, maybe I'm not seeing something.
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
@gxleano the problem with the implementation in โจ Add a setting form where Tagify widget can be set as default when a supported field is created Active is that it works for new Drupal installations, whether Drupal CMS or vanilla Drupal. But if an existing site, that already has tagify enabled, will not have any setting for
set_default_widget
, neither true nor false. That may create PHP warnings when using the return value from$config->get('set_default_widget')
, as it's expected to be TRUE or FALSE, but you may get NULL instead.Therefore, adding an update hook in the module, which will only be executed on existing sites when updating to the latest tagify version, you can make sure to initialize that new config value. New installations of Drupal CMS will not be affected by that, so that they will receive the default value from the recipe, which is fine.
- ๐ช๐ธSpain gxleano Cรกceres
Now I see!
It totally makes sense.
Thanks Jurgen.
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
When a recipe installs a module, the simple config from that module is imported. So you can't import your own version of that config because it will already exist. Failures abound, config explosions everywhere!%&#@^&$^&!
Instead, in each of the recipe's config actions section, use the simpleConfigUpdate action to rewrite them.
config: actions: tagify.settings: simpleconfigUpdate: set_default_widget: true
- ๐บ๐ธUnited States phenaproxima Massachusetts
I'd love to get this committed today, because we're intending to roll Drupal CMS 1.1.0 this week and it would be great to have this in by then.
- ๐ช๐ธSpain gxleano Cรกceres
Thanks @thejimbirch, it was also a suggestions by @plopesc, so I will update it.
I will finish this today @phenaproxima.
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Changes looks good. Marking as RTBC assuming the tests pass.
-
phenaproxima โ
committed 01a45de2 on 1.x authored by
gxleano โ
Issue #3513359 by gxleano, thejimbirch, jurgenhaas, phenaproxima: Set...
-
phenaproxima โ
committed 01a45de2 on 1.x authored by
gxleano โ
- ๐บ๐ธUnited States phenaproxima Massachusetts
Looks great y'all. Merged into 1.x. Thanks!
- ๐บ๐ธUnited States phenaproxima Massachusetts
This will need to be mentioned in the change record for โจ Enable Tagify in Admin UI recipe Active , so tagging accordingly. We won't need a separate change record, but we need to remember to describe the changes in this issue, in that change record.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Created the change record, it just needs details filled in. https://git.drupalcode.org/project/drupal_cms/-/wikis/Committer-Info/Cha... can be used as a template.
- ๐ฆ๐บAustralia pameeela
I was blown away to see this already working in 1.x! So cool to get these minor but so important improvements happening :)
Do we definitely need a CR for this? Tagify is added in the same release as this change.
- ๐ฆ๐บAustralia pameeela
Didn't read the comments properly, I've updated the CR with info.
- ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Change record updated and published.
Automatically closed - issue fixed for 2 weeks with no activity.