Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
When Quickedit is activate I have got this message in the browser console : Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
However, the module works well Some users report Quickedit not working at all when they get this warning message.
When I try to find the bug in Quickedit.js, this line is cause of problem :
entityElement.setAttribute('data-quickedit-entity-instance-id', entityInstanceID);
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#14 | Screen Shot 2017-02-09 at 11.02.07 AM.png | 290.37 KB | jsulmar |
Comments
Comment #2
Wim LeersThanks for reporting this! This warning has also bothered me a lot.
When trying to find the root cause, it blames
jQuery.ajax()
. When I set breakpoints in there, Chrome doesn't allow me to inspect any of the variables. When I add logging, Chrome doesn't log it. What the hell?In any case, Quick Edit doesn't do anything special, it merely uses the AJAX system.
Comment #3
droplet CreditAttribution: droplet commentedInsertion of the SCRIPT tag caused the problem.
https://github.com/jquery/jquery/issues/1895
Comment #4
Wim LeersAha!
Comment #5
sukanya.ramakrishnan CreditAttribution: sukanya.ramakrishnan commentedany updates on this one? am getting this error with an ajax view and once this errors throws up custom javascript behaves very inconsistently?
regards
Sukanya
Comment #6
DanielVezaI just had the same issue as sukanya.ramakrishnan.
While the notice was there my custom JS wouldn't work correctly. As soon as I disabled quickedit the warning disappeared and the js worked as expected.
Comment #7
droplet CreditAttribution: droplet commentedIn general, the warning won't break the JS executions but slow down the responses. What's your browser version? and any steps to reproduce?
Looking at Network Tab in Chrome for the JS loading. If you can, right click and save the HAR in network and Timeline data to us.
Could it be this issue?
#1988968: Drupal.ajax does not guarantee that "add new JS file to page" commands have finished before calling said JS
(Even not this issue, the patch may sort the problem. It loads JS async instead)
Comment #8
Wim LeersIndeed.
Comment #9
jimafisk CreditAttribution: jimafisk commentedDanielVeza - Thanks for the tip in #6, that worked for me. Disabling QuickEdit allowed my custom javascript to work properly again.
Comment #10
droplet CreditAttribution: droplet commented@Wim,
Can we defer that 2 scripts loading (plainTextEditor & formEditor) until actual usages of QuickEditor (after first Quick edit click)? It always good, not just for this issue. I think 90%+ admin page load are not used Quick Edit (& contextual link)
Ajax loaded scripts in Drupal missed cache hit. On a slow network, it could be one sec or more delay.
Comment #11
clemens.tolboomComment #12
SkinComment #6 worked for me: after disabling quick edit the warning disappeared an the site become fast again.
Comment #14
jsulmar CreditAttribution: jsulmar commentedI observe this warning with Chrome only when a custom block is visible AND QuickEdit is enabled. The warning is not caught by Firefox/Firebug. If it helps, attached is a screen shot from the Chrome console.
Comment #15
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedI'm getting this same issue on Chrome and Firefox. In my case Quickedit is not working on both browsers.
Comment #16
droplet CreditAttribution: droplet commentedThe last patch in the following issue will sort out this problem: #1988968: Drupal.ajax does not guarantee that "add new JS file to page" commands have finished before calling said JS
I have no 100% confidence but it seems the error message is more than just a warning. So my #7 comment was wrong.
Comment #17
pritam.tiwari CreditAttribution: pritam.tiwari commentedI am also facing the same issue. Getting this error on block configuration overlay form and with custom JS. I have also disabled the quick edit module.
Comment #18
milesgwood CreditAttribution: milesgwood commentedI also ran into this same issue. None of my css or js files were running with that single console warning appearing. Uninstalling the Quick Edit module solved the problem.
Comment #20
YuvalBH CreditAttribution: YuvalBH as a volunteer commentedany update with this issue on drupal7.
It seems it is causing submit buttons to be hidden, preventing any editorial flow to work, even setting field groups.
This issue is very critical
Comment #22
Kris77 CreditAttribution: Kris77 commentedNews on how to solve this problem in Drupal 7?
Comment #25
agileadamFWIW on 8.7.2 this warning goes away if I uninstall the BigPipe module (from core).
Enabling and disabling QuickEdit had no effect.
Comment #26
malcolm_p CreditAttribution: malcolm_p commentedI see the same as @agileadam the warning is from big_pipe regardless of whether quickedit is installed.
This is related to https://xhr.spec.whatwg.org/#the-open()-method
Warning stack trace below:
Comment #27
ahimsauziI am on 8.7.5 and disabling QuickEdit took the warning away. BigPipe was never installed.
Comment #28
AltaGrade CreditAttribution: AltaGrade commentedJust as in #25 and #26 the error in our use case was gone after disabling the BigPipe module.
Comment #30
TomSaw CreditAttribution: TomSaw commentedIn my case, using Drupal 8.8.1:
Disabling quickedit cleared the warning.
No effect with disabled big_pipe.
Comment #32
rjdjohnston CreditAttribution: rjdjohnston commentedRemoving bigpipe isn't a good solution. It significant increases page load times, for me at least. Sad to see Quickedit go, but uninstalling allowed me to edit layouts again :(
Comment #33
RgnYLDZ CreditAttribution: RgnYLDZ commentedI was doing tests on lighthouse and it gave me two errors on "Best practices" on D9.0.2.
The warning goes away if BigPipe is uninstalled. Quicktabs had no affect at all.
The error on lighthouse (twice) :
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
Comment #35
vistree CreditAttribution: vistree commentedSame problem here! On views pages with facets blocks and BigPipe enabled, I get the same error. Removing the facets blocks OR disabling BigPipe removes the error. But both is not a solution for us ;-)
Comment #37
tonytheferg CreditAttribution: tonytheferg commentedseeing this on any pages with nav tabs or quick edit. disabling quick edit seemed to help the pages without nav tabs.
Comment #38
DamienMcKennaFTR D7 sites are seeing this with the Views interface, see #3240521: [Deprecation] Synchronous XMLHttpRequest for details.