Bootstrap replaces the Drupal.Ajax.prototype.success method to deal with custom throbber, but then it should invoke the original handler using apply, not with a copy of the core code, because that may hide errors that have been fixed in core or misfunction for other changes in core code.

Here's where this happens:

https://git.drupalcode.org/project/bootstrap/-/blob/8.x-3.x/js/misc/ajax...

It shoud save the pointer of the original handler and be invked by call/apply after custom bootstrap code. ir. something like this:

  var success = Drupal.Ajax.prototype.success;
  Drupal.Ajax.prototype.success = function (response, status) {
    if (this.progress.element) {

      // Stop a glyphicon throbber.
      if (this.progress.glyphicon) {
        this.glyphiconStop(this.progress.element);
      }
      // Remove the progress element.
      else {
        this.progress.element.remove();
      }

      // Remove any message set.
      this.progress.element.parent().find('.message').remove();
    }

    // Invoke original success handler.
    return success.apply(this, [response, status]);
  };
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux created an issue. See original summary.

markus_petrux’s picture

Status: Active » Needs review
FileSize
2.91 KB

I hope the explanation makes sense... patch attached.

markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.