Install
Works with Drupal: ^10 || ^11 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
122.28 KB
MD5: 22b3af2b2b765cfd85069644ae3ec2e8
SHA-1: 7b909998cf654f5d2eaaf5cfb070e78535b2df6c
SHA-256: 8732a54a62ee68f71e1b477aea8e55d1859df11c900e4dee4fc4d2bc60df507b
Download zip
186.59 KB
MD5: 229cfa13942d650c29e76b4a6f87845d
SHA-1: 07d03b6a2b42d1455e97b2e7d5ad6304ba0cb586
SHA-256: 3c5868b6ecff2864919d99950c304da5ea2dad6b7fb1f33be974844a87f52d87
Release notes
Drupal 12 support, no more jQuery on anonymous pages, and a fix for settings defaults that were never applied.
Requirements
- Drupal
^10 || ^11 || ^12. - The
selectify_webformsub-module needs Webform (a 6.3.x release).
Drupal 12
^12is now declared inselectify.info.ymlandcomposer.json.- Hooks moved from procedural code into
src/Hookclasses (Selectify and Selectify Webform), with#[LegacyHook]wrappers so Drupal 10 and 11 keep working. The hook classes receive their dependencies by injection. - The five field widgets and two queue workers now carry the plugin attributes. The docblock annotations are kept, so Drupal 10 still discovers them.
- Hook functions in
selectify.modulenow declare their types; update hooks no longer pass the deprecated argument toConfig::save().
Fixes and improvements
- jQuery is no longer loaded on anonymous front-end pages. Eight libraries declared
core/drupal.ajax, which pulls in jQuery, and nothing in Selectify uses it. Selectify behaviours still re-attach on content that arrives by Ajax, and Drupal still adds the Ajax library by itself wherever a form or view needs it. - Settings defaults were never applied. Seven reads were written as
$config->get('key', 'default'), butConfig::get()takes one argument, so the default was silently dropped and the value wasNULL(for exampleaccent_colornever fell back toneutral, andwidget_for_filterswasNULLinstead of an empty array). They are nowget('key') ?? 'default'. This only showed when a key was absent from stored configuration (config that predates a key, a partial import); a clean install ships every key.
After updating
Run drush cr (new hook services must be registered). This release adds no database updates.