Problem/Motivation
In #3487971: Convert system_page_attachments to OOP we're moving system_page_attachments() into BareHtmlPageRenderer wholesale, then calling it from system's hook_page_attachments() implementation.
At least some, possibly most of the logic is not actually needed by BareHtmlPageRenderer - we should try to move what we can back to system's page_attachments hook implementation.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3488965
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mstrelan commentedAdded the related issue where the call to
system_page_attachmentswas first added toBareHtmlPageRendererComment #3
mstrelan commentedI've had a look at everything this function does and broken it down below. From what I can tell most of it is still required, except maybe
"Attach libraries used by this theme" and"Handle setting the "active" class on links". Would be good to get a second opinion.I'm not sure if this is attaching it for maintenance pages, or for the installer to match maintenance pages. If it's the former, well
ThemePreprocess::preprocessMaintenancePagealready adds these, so I'll assume it's the latter. And Claro already depends onsystem/adminso we get these attached on the installer already. But I guess the installer could use a different theme that doesn't have that dependency, so this would be required.Without this I still get theme libraries attached on the installer, e.g. the first one that xdebug sees is
core/drupal.messageand I see/core/themes/claro/css/components/messages.cssin the page markup. But maintenance pages have no styles without this.Without this there is no favicon on the installer.
As above.
Unless I'm overlooking something, by definition it's impossible for the user to be authenticated at install time.
Comment #5
mstrelan commentedPossibly a duplicate of #3428339: Remove calls to system_page_attachments() actually. Although maybe that can be repurposed to just moving the library from system to core.
Comment #6
smustgrave commentedCan the summary be flushed out some please, sorry to be that guy.
Comment #7
mstrelan commentedI think we need @catch to weigh in here. I think it might be better to focus on the work in #3428339: Remove calls to system_page_attachments() and see if there's anything left to do here.