Problem/Motivation
The ContentModerationConfigureForm
currently uses ajax to launch a modal window for selecting the kind of entity types and bundles that should be moderated. This can be found at the bottom of \Drupal\content_moderation\Form\ContentModerationConfigureForm::buildConfigurationForm
with a link that adds the "use-ajax" class.
The link targets a form that only works when launched in an ajax modal window, but there is no dependency on core/drupal.ajax
.
Steps to reproduce:
- Install Drupal using the "minimal" install profile.
- Enable content moderation.
- Navigate to /admin/config/workflow/workflows/manage/editorial
- In the "This workflow applies to:" section, click "Select".
- No modal window will be launched.
Proposed resolution
Make sure we indicate that the core/drupal.ajax
library should be attached to the link by adding '#attached' => ['library' => ['core/drupal.ajax']],
to the link render array.
Remaining tasks
Patch and review.
User interface changes
A fixed modal window when some other component doesn't add AJAX the admin interface.
API changes
None.
Data model changes
None.