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

sun’s picture

As 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.

sun’s picture

Title: pass in empty string for the pathname to new Extension() » Pass in empty pathname for the fake theme Extension in drupal_theme_initialize()
Issue tags: -Configuration system, -D8MI
Parent issue: #1067408: Themes do not have an installation status » #2228093: Modernize theme initialization
Related issues: +#1067408: Themes do not have an installation status

Not 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.

cosmicdreams’s picture

#2228093: Modernize theme initialization has been committed. Should this issue be closed as a result?

sun’s picture

Title: Pass in empty pathname for the fake theme Extension in drupal_theme_initialize() » Allow to initialize ActiveTheme without Extension object
Priority: Minor » Normal
Issue tags: -Framework Initiative
Related issues: +#2325575: Theme must not be primed in core.extension and KernelTestBase

The 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.

joelpittet’s picture

Status: Postponed » Closed (duplicate)

The function _drupal_theme_initialize() doesn't exist, the service doesn't expect an Extention.