Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
request processing system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 May 2015 at 13:22 UTC
Updated:
16 Feb 2025 at 06:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fabianx commentedComment #2
Crell commentedWhere is this alleged code...?
Comment #3
fabianx commentedCurrently template_preprocess_html() and it looks different:
should be:
What is in the IS is after that other issue is in ...
Comment #4
wim leersAll AJAX requests are POST requests. (Yes we are working towards making AJAX GET requests possible too, but we're not there yet.)
Therefore I don't see how we ever can hit this bug. Shouldn't this therefore be normal?
But yes, it is a bug.
Comment #5
fabianx commentedNope, this is especially there to support rails turbolinks, so for any request to e.g. /node/?ajax_page_state=drupal/drupal
you tell the server, which libraries you have loaded already and it then just loads the remainder, etc.
Comment #6
wim leersSure, but in core that never happens.
Comment #7
dawehnerSure, at some point we also want to switch to GET for normal ajax request but still keep support for ajax forms, which will be POST.
Comment #8
melvinlouwerse commentedNot sure if i put the tests in the right directory but as the changed code is in core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php i added it to the directory for Render test. If this is not the correct directory let me know where i should move it to please.
Comment #9
melvinlouwerse commentedComment #12
melvinlouwerse commentedfix the patch
Comment #13
melvinlouwerse commentedComment #14
duaelfrThank you @melvinlouwerse for this work!
I have two comments, though.
First, I think you should keep using the injected requestStack service (as written in the issue summary) because it makes the method more testable and it also avoids an unneeded call to the container.
Also, could you please also post a test-only patch to be sure that the existing code is failing? See that documentation on how to write tests that includes that part: https://www.drupal.org/contributor-tasks/write-tests
Comment #15
duaelfrComment #16
wim leers@melvinlouwerse Feel free to assign the issue to yourself :)
Comment #17
melvinlouwerse commentedComment #18
melvinlouwerse commentedSorry i indeed seem to have copied the wrong piece of code (from a comment not from the summary).
Comment #19
melvinlouwerse commentedComment #22
fabianx commentedHah, so great to see an issue get done while away!
Thanks so much @melvinlouwerse
RTBC, nice work on the tests!
--
Added beta evaluation.
Comment #23
legolasboRTBC +1
Comment #25
effulgentsia commentedYay, nice to see this fixed! Pushed to 8.0.x.
Comment #26
claudiu.cristeaThis is causing errors on the old bot. Followup #2579965: AssertContentTrait "use"d twice in AjaxPageStateTest.
Comment #28
quietone commented