- First commit to issue fork.
- Merge request !23Issue #3181631: Use theme function for ajax progress β (Merged) created by rang501
- Status changed to Needs review
over 1 year ago 11:29am 9 March 2023 - πͺπͺEstonia rang501 Viljandi
I created an issue fork and applied the latest patch.
There were one issue with once(), which is now fixed and the entity browser under Gin theme looks fine. - πͺπͺEstonia rang501 Viljandi
Ajax throbber issue should be fixed, the z-index was wrong, caused by small class name change.
- π¦πΊAustralia acbramley
Nice, this fixes the broken throbber in Gin for me.
- last update
over 1 year ago 56 pass - π§πͺBelgium akasake
I am getting error with drupal 10
Uncaught TypeError: $(...).once is not a function
So I changed patch 3 a little.
- Status changed to RTBC
about 1 year ago 8:34am 20 November 2023 - πͺπΈSpain eduardo morales alberti Spain, πͺπΊ
D10.1.6 and patch #14 working for us. RTCB!
- π§πͺBelgium tim-diels Belgium π§πͺ
Drupal 10.1.7 and entity_browser 2.9.0 and patch from #14 fixes the issue.
- πΊπΈUnited States dave reid Nebraska USA
Dave Reid β made their first commit to this issueβs fork.
-
Dave Reid β
committed 0a3fdfcf on 8.x-2.x authored by
rang501 β
Issue #3181631 by Dave Reid, rang501, volkerk, akasake: Use Drupal.theme...
-
Dave Reid β
committed 0a3fdfcf on 8.x-2.x authored by
rang501 β
- Status changed to Fixed
12 months ago 5:48pm 11 December 2023 - πΊπΈUnited States dave reid Nebraska USA
Tested both usages of the progress throbber and both work as expected. Merging to 8.x-2.x.
Automatically closed - issue fixed for 2 weeks with no activity.
- π§πͺBelgium cgoffin
After updating to v2.10 the throbber is rendered when opening the modal, but never removed. This blocks the entire page.
- Status changed to Fixed
9 months ago 7:30pm 22 February 2024 - πΊπΈUnited States dave reid Nebraska USA
Can you check your browser's JavaScript console for any errors that might have stopped JS from running to remove it?
- π©πͺGermany ammaletu Bonn, Germany
We have the same problem: Since the update to version 2.10.0, the throbber is added but not removed. This makes sense, since there is no code removing it. In other instances, the throbber is set through `Drupal.Ajax.prototype.setProgressIndicatorThrobber`, where a reference to the element is saved and would later be removed. The entity browser module simply adds the HTML code for the throbber through `Drupal.theme.ajaxProgressThrobber`. This doesn't generate a reference in `this.progress.element`. The entity browser module itself has no code to remove the throbber again, as far as I can see.
Should we open a new ticket for this?
- π©πͺGermany ammaletu Bonn, Germany
This seems to work in Claro, because `Drupal.behaviors.entityBrowserAddThrobber` is called, but it doesn't go into `if (context === document) {`. In our own theme it does, though, and thus adds a second throbber, after a first one has been added and removed through the proper methiods (briefly, virtually impossible to see withoput debugging).
I see that `Drupal.behaviors.entityBrowserAddThrobber` has just been added in version 2.10.0 (see commit https://git.drupalcode.org/project/entity_browser/-/commit/0a3fdfcf801b8...). I'm just not sure what the IF check is supposed to do and why this works in some themes and not in others.
- πΊπΈUnited States joshua.boltz
I can also confirm in my custom admin theme (which is a subtheme of Claro) that the Ajax throbber is not shown when the entity browser is loading up through the modal.
I can confirm in dev tools, that the entity_browser.modal.js file, of this code:
Drupal.behaviors.entityBrowserAddThrobber = { attach: function (context) { if (context === document) { $(window).on({ 'dialog:aftercreate': function (event, dialog, $element, settings) { if ($element.find('iframe.entity-browser-modal-iframe').length) { $element.append(Drupal.theme('ajaxProgressThrobber')); } } }); } } };
That the code inside of the "if (context === document)" conditional does not run.
The breakpoint hits on that line, but does not go inside of that check, which means this code does not run, which is probably why the throbber is missing.I am interested what needs to happen to fix that, and what happens once the throbber is shown, if I will then run into issues of it being not removed when it should like some people have mentioned.
- πΊπΈUnited States joshua.boltz
I confirmed by editing entity_browser.modal.js locally, that by removing the conditional, that the ajax throbber does get shown. Actually, 5 of them got shown, I assume because of the missing context. But still, the throbbers were tiny and added to the bottom of the modal. And lastly, they did not disappear after the entity browser was ready in the modal.
- πͺπͺEstonia drugan
I've tried the #8 π Use theme function for ajax progress Fixed solution to remove the throbber but to no avail.
Can somebody please to explain the rationale behind this throbber or give an advice on how to remove it?