Fixed
Project:
Drupal core
Version:
12.0.x-dev
Component:
ajax system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Sep 2026 at 10:46 UTC
Updated:
2 Oct 2026 at 19:06 UTC
Jump to comment: Most recent
Comments
Comment #2
fathershawnComment #3
fathershawnWorking on the tests
Comment #5
fathershawn1 unrelated test failing - which has failed 5 times in the last 14 days
Comment #6
godotislateHaven't gone over everything in detail yet, but I do have some comments on the MR.
Comment #7
ironnuts commentedI agree with godotislate that by using Route attributes no need for the entries in routing yml.
Symfony has a relevant example (click on Attributes tab) https://symfony.com/doc/current/routing.html#parameters-validation
That is a simple example. So would look like:
Comment #8
ironnuts commentedIs that what you had in mind, godotislate?
Comment #9
fathershawnFeedback addressed. If comments can be resolved it would be super to get this bug fix in!
Comment #10
ironnuts commentedfathershawn I have reviewed the code and noted that the comments have been resolved. I have added a new comment suggesting consolidation of the 3 routes into 1, but it a suggestion and does not need resolving. Maintainer can consider my suggestion if they want to.
Comment #11
godotislateRan the test only job, and only the new
testMissingSwapTargetfails.testMissingPartialTarget, ttestPartialTarget, andtestPartialDeleteare all passing.I pulled the test code down locally (without the fix) and manually recreated the test steps on the test form in browser. Checking either "Target does not exist" box (
bad_swap_targetandpartial_missing) in separate requests does generate console errors, but checking either "Replace via partial" or "Delete via partial" does not generate any console errors. I'm not sure whether this is expected for the latter two cases.But for
testMissingPartialTarget, presumably that test should fail since I do see errors in the console manually, so I'm not sure why the automated test isn't failing. Setting to NW for that.Comment #12
fathershawntestMissingPartialTargetdoes not fail in test only due to an interaction between htmx and our testing code.Htmx traps the error
And so we see in console:
htmx: htmx:error: null is not an object (evaluating 'element.parentElement')
Our code traps the error event:
Because the htmx has trapped the error and triggered a custom event, our test code does not react and the test passes without the fix in place.
Revised the test to send two partials: the first with a bad target which stops execution.
Comment #13
fathershawnUnrelated
Drupal.Tests.workspaces.FunctionalJavascript.WorkspacesMediaLibraryIntegrationTestfailed. Has failed 3 times in the last 14 days.Comment #14
godotislateChanges look good. Test only fails for testMissingPartialTarget as well.
@fathershawn, can you confirm that
testPartialTarget, andtestPartialDeleteare expected to pass test only? If so, feel free to self RTBC.One note is that I think it might be worth looking into whether the test methods could be consolidated, so that bootstrapping doesn't have to happen 4 times, but I think that can be handled in a follow up, since this critical and the first 12.0 beta is already out.
Comment #15
fathershawnConfirmed!
Comment #16
fathershawnComment #17
fathershawnComment #18
fathershawnComment #19
fathershawnComment #20
fathershawnComment #23
longwaveCommitted and pushed 0af7577cc6b to main and 2ae3db67a89 to 12.0.x. Thanks!