Closed (duplicate)
Project:
Drupal core
Version:
8.3.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Jan 2015 at 10:31 UTC
Updated:
26 Sep 2016 at 16:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sqndr commentedComment #2
attiks commentedComment #3
attiks commentedAccording to #2412945-6: Determine which additional asset libraries should be in the critical path/loaded i/t header (core/drupal, core/dropbutton) it is wrapped inside conditional IE8 comments
Comment #4
wim leersRoughly:
hook_element_info_alter(), dounset($types['html']['#attached']).Comment #5
sqndr commentedDoes
hook_element_info_alter()work? I'm working on Panda theme. I've implemented the hook insidepanda.theme, without any result. If I addexit;to file and reload, the page is blank, so I'm sure Drupal reads the file. Then I went to core'sseven.theme, because it's implementing the hook as well. I tried several ways of adding and removing things in this hook (Seven implements), but it seems to me it's not doing much?Comment #6
wim leersIt doesn't work in your Panda theme, because:
… it's only invoked for modules. I think that's a bug; themes should be able to alter existing elements, even if only to attach their own assets to it. (Or, in this case, to remove it.)
Pinging catch about that.
Comment #7
sqndr commentedThat's what I thought … but yeah, it should be reported as a bug because Seven implements the hook as well ;) Let me know the result!
Comment #8
wim leersAsked catch, his response:
So we can fix #6, but we'll have to make sure elements are cached by theme. All render caching already happens per theme (for analogous reasons), so there's no problem there.
Comment #9
wim leersComment #10
sqndr commentedComment #11
sqndr commentedSince #2448843: [regression] Themes unable to implement hook_element_info_alter() got fixed, need to test this again, because this should now be possible.
Comment #12
sqndr commentedComment #13
joelpittetPostponing this as well
Comment #14
joelpittetWe may be able to start working on this for 8.1
Comment #15
joelpittetHere's a patch to remove it from being loaded but leaves it in core.
Comment #16
joelpittetWith patch
Comment #18
joelpittetWhoops forgot my regex delims
Comment #21
joelpittetWhoops this is a duplicate now of #1993334: Add HTML5shiv to Stable and Classy only