Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Follow-up from #1067408-223: Themes do not have an installation status.
in core/includes/theme.inc
+ // /core/core.info.yml does not actually exist, but is required because
+ // Extension expects a pathname.
+ _drupal_theme_initialize(new Extension('theme', 'core/core.info.yml'));
Proposed resolution
Allow an empty string for the pathname as an argument to new Extension().
Remaining tasks
?
User interface changes
No.
API changes
?
Comments
Comment #1
sunAs part of the effort in #2228093: Modernize theme initialization, the idea/plan was to remove this workaround entirely and allow the theme system to (natively) work without a theme extension.
I.e., instead of creating and initializing a fake theme extension object, no theme will be initialized instead.
Comment #2
sunNot un-postponing, because I don't consider this change proposal to be valid/legit, and the parent meta issue should resolve this more cleanly anyway.
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commented#2228093: Modernize theme initialization has been committed. Should this issue be closed as a result?
Comment #4
sunThe parent issue did not resolve it. In fact, the code in question was removed, but needs to be added back (see related issue).
Re-titling issue to reflect the new architecture. Not sure whether this is worth the effort, and whether it is possible at all.
Comment #5
joelpittetThe function
_drupal_theme_initialize()
doesn't exist, the service doesn't expect anExtention
.