The message here is pretty bizarre, neither of the two classes suggested as replacements exist in Drupal, and are not used in the sample code. Please consider editing this to avoid confusion.
Oh silly me, that's what chr.fritsch was referring to - I needed to explicitly install the dev version of select2 from npm, which does have support for Jquery4. That's fine, although tagify looks very nice thanks for the tip, may try this at some point. Select2 JS is definitely showing its age.
Hmm not sure what I'm doing wrong, I have both a select2 field on a content type and use the element in a custom field, with D10 it works but with 11.0.9, after applying the patch and rebuilding I am able to install the module and add fields etc but on both custom form and content type I get a broken field and console errors:
Uncaught TypeError: c.isArray is not a function
_resolveLanguage https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
applyFromElement https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
e https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
d https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
select2 https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
jQuery 2
select2 https://dkan-d11.ddev.site/libraries/select2/dist/js/select2.min.js?so8ouv:2
attach https://dkan-d11.ddev.site/modules/contrib/select2/js/select2.js?so8ouv:60
jQuery 2
attach https://dkan-d11.ddev.site/modules/contrib/select2/js/select2.js?so8ouv:10
attachBehaviors https://dkan-d11.ddev.site/core/misc/drupal.js?v=11.0.9:166
attachBehaviors https://dkan-d11.ddev.site/core/misc/drupal.js?v=11.0.9:162
<anonymous> https://dkan-d11.ddev.site/core/misc/drupal.init.js?v=11.0.9:32
listener https://dkan-d11.ddev.site/core/misc/drupal.init.js?v=11.0.9:20
select2.min.js:2:56247
This happens with JS aggregation on or off.
Thanks chr.fritsch. Looking forward to a D11-compatible release, for now getting by with the patch plus https://github.com/mglaman/composer-drupal-lenient
Would just like to point out that there has been significant progress in resurrecting justinrainbow/json-schema as a community-supported project, though the future is still uncertain: https://github.com/justinrainbow/json-schema/issues/658
There is a tentative pseudo-roadmap that includes support for recent drafts of the spec.
To be clear this is the project https://www.drupal.org/project/dkan β
dafeder β created an issue.