Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291583

The ContentModerationConfigureForm is missing a library dependency on core/drupal.ajax.

$
0
0

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:

  1. Install Drupal using the "minimal" install profile.
  2. Enable content moderation.
  3. Navigate to /admin/config/workflow/workflows/manage/editorial
  4. In the "This workflow applies to:" section, click "Select".
  5. 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.


Viewing all articles
Browse latest Browse all 291583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>