Problem/Motivation

Drupal has 2 types of ajax progress indicators: throbber and fullscreen. When the progress is of type throbber the ajax loader is triggered (for example after clicking on an ajax link), the ajax loader is displayed properly, but when the event gets fired a second time (if the user clicks again on an ajax link without reloading the page) the ajax loader is not displayed again.

This is happen even when the setting "Always show loader as overlay (fullscreen)" is enabled. In the other hand, fullscreen progress like views works as expected and the ajax loader is displayed across multiple requests.

Steps to reproduce

- Place a link with the class "use-ajax" anywhere on the page.
- Click on the ajax link.
- The ajax loader is displayed.
- After the ajax response, the ajax loader disappear as expected.
- Click again on the ajax link.
- The ajax loader is not displayed.

Proposed resolution

I'm not sure if it's the right solution, but returning always false on the method progressIsSet() when the progress type is throbber will fix the issue.

Remaining tasks

- patch
- review
- test

User interface changes

- None

API changes

- None

Data model changes

- None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

akalam created an issue. See original summary.

akalam’s picture

Status: Active » Needs review

I've created a MR with a fix. Not sure if it's the optimal solution but it works.

mvogel’s picture

Thanks, @akalam,
yes, this #3331491 MR introduced this bug, but fixes another bug. So maybe we have to roll back this change because it triggers more bugs than it fixes.

mvogel’s picture

I tested it, and it seems promising. Maybe we can get some feedback from the persons involved in the linked issue.

evilargest’s picture

Status: Needs review » Reviewed & tested by the community

I tested the changes from the MR and they do resolve the issue I've faced, thanks guys. Cheers!

  • mvogel committed 956ebfb2 on 2.x authored by akalam
    Issue #3423380 by akalam: The ajax loader is being displayed only the...
mvogel’s picture

Thanks all, I committed it and will create a new release

mvogel’s picture

Status: Reviewed & tested by the community » Fixed
akalam’s picture

Thanks for reviewing and applying the fix!

Status: Fixed » Closed (fixed)

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