Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
asset library system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2023 at 22:54 UTC
Updated:
5 Jun 2024 at 12:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedComment #3
lauriiiComment #4
catchPatch is somewhat self-explanatory, there already exists code that tries to do this, at least since 2015, but it's not checking the right thing consistently.
So an old bug but exposed by the new routes/controllers.
Comment #5
catchEven the simplest patches need linting.
Comment #6
keshavv commentedBefore the #5 patch.


After the #5 patch.
Confirmed that the #5 patch working well.
Comment #7
keshavv commentedComment #8
longwaveIs it possible to add test coverage for this? If it is by design that CSS/JS is not aggregated in maintenance mode we should probably have an assertion for this.
Comment #9
catchYes we've already got test coverage that's similarly incomplete to the code so can extend that.
Comment #10
longwaveThis comment should probably mention both CSS and JS.
Comment #12
catchReworded a bit.
Comment #13
lauriiiHave we stopped relying on the
MAINTENANCE_MODEconstant for the maintenance mode? I couldn't find where we're setting that for the actual maintenance mode.I'm also wondering if you had a specific reason for not using dependency injection for the state?
Comment #14
ambient.impactGlad to be the proverbial canary in the coal mine for this. Love seeing all the work going into this.
Comment #15
catchIt's still set in install.php. It used to be used in update.php, but that's been a route for several years now, we should open a new issue to factor it away entirely if there isn't already one - could add a special installer state service for pre-database that always returns it as true or something like that.
No I was just copying and pasting from HtmlAttachementsResponseProcessor which already doesn't use dependency injection for state for the js case. Can look at injecting it, as long as the patch is still patch release-safe we might as well do it here.
Comment #16
longwaveFor me, injecting state can be done in a followup given that using
\Drupalwas an existing pattern here, and I agree that the MAINTENANCE_MODE vs state variable is confusing and that we should open a followup to try and unify that if we can.edit: #3058881: Update MaintenanceMode service and deprecate legacy API and #2538292: Remove atavistic references to MAINTENANCE_MODE == 'update' and supporting code and a number of similar issues already exist
Comment #19
lauriiiCommitted b63275f and pushed to 11.x. Thanks! Also cherry-picked to 10.1.x.
Comment #20
catchWas going to open a follow-up for dependency injection, but seeing #3058881: Update MaintenanceMode service and deprecate legacy API I wonder if it should just be that issue (or child issues of that issue for conversions).
Comment #21
ambient.impactAwesome work. Thanks everyone.
Comment #23
cilefen commentedA contributor raised a bug about this: #3452672: JavaScript files added by AJAX responses are only optimized in maintenance mode.