Themes dependencies for theme engine are not checked before installing a theme

Created on 26 November 2015, over 9 years ago
Updated 27 April 2024, 11 months ago

Problem/Motivation

Themes can be dependent on a theme engine but when themes are being installed Drupal won't check if theme engine actually exists in the code base. This will cause template overrides in the theme to not be loaded which might be very confusing because Drupal is unable to show any error message in the situation.

Proposed resolution

Check themes dependencies for theme engines before enabling them.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Postponed: needs info

Version

11.0 ๐Ÿ”ฅ

Component
Themeย  โ†’

Last updated about 23 hours ago

Created by

๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    Is this still relevant for Drupal 10 or later?

    Since we need more information to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Active 11 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States xjm

    I think what this actually needs is manual testing of whether it still happens. The IS includes all the info needed to perform manual testing, so PMNMI doesn't seem quite correct. Thanks!

  • Status changed to Postponed: needs info 11 months ago
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    Yes, I agree it needs manual testing. However, I chose PMNMI because, for me, the issue summary does not explain how to manually test this so I was not able to do so. Therefor, I choose to ask if it was still valid.

    I am changing that status back to PMNMI as a way to ask for the steps to reproduce.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    There isnโ€™t a straightforward way to test this because additional theme engines beyond Twig arenโ€™t really being used (at least in the open), and as far as I know, there arenโ€™t any open-source themes that utilize a different engine. If you do want to try to reproduce this, you could add an empty page.tpl.php file to the Stark themeโ€™s templates directory, then switch the theme engine to phptemplate with engine: phptemplate in the info.yml.

    • If phptemplate is present, the page.tpl.php template should return empty.
    • If phptemplate is not present, Drupal will fall back to the core page.html.twig template instead.

    The fact that it was possible to install Stark even when the theme engine was missing is problematic because if that engine isn't actually available, Drupal ends up using the default Twig templates instead of the ones provided by the theme, which would result in a broken experience.

Production build 0.71.5 2024