The "drupal.progress" library definition lacks required dependency

Created on 25 October 2024, 7 months ago

Problem/Motivation

Drupal.ProgressBar() calls Drupal.AjaxError() when sendPing() has an Ajax error. But, drupal.progress which is defined Drupal.ProgressBar(), don't have drupal.ajax which is defined Drupal.AjaxError() as a dependency. When sendPing() occurs Ajax Error at a page which is loaded only /core/misc/progress.js, it occurs JavaScript error.

Steps to reproduce

  1. Install Drupal with the standard profile.
  2. Add core/drupal.progress to libraries in the /core/themes/olivero/olivero.info.yml.
  3. Logout from installed Drupal site.
  4. Go to /user/login
  5. Open browser developer console.
  6. Execute below code.
var testPB = new Drupal.ProgressBar(
	'test',
	() => {},
	'GET',
	() => {}
);
testPB.startMonitoring('test', 1000);

Proposed resolution

Move Drupal.AjaxError() to new library definition and fix existing libraries definition.
If core/drupal.ajax is added as dependency to core/drupal.progress, it makes circular dependency.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

javascript

Created by

πŸ‡―πŸ‡΅Japan tom konda Kanagawa, Japan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024