Problem/Motivation

When a theme didn't have a base theme property in their info metadata, exception will thrown with following message:

Missing required key ("base theme") in themes/custom/my_theme/my_theme.theme/my_theme.theme, see https://www.drupal.org/node/3066038

The correct path should be themes/custom/my_theme/my_theme.info.yml

Steps to reproduce

  • Create custom theme
  • Omit base theme property in info.yml
  • Clear drupal cache

Proposed resolution

Use getPathname to get the correct path

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3228963

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

el7cosmos created an issue. See original summary.

el7cosmos’s picture

Title: Wrong path for Exception message in ThemeExtensionList » 3228963-wrong-path-exception-message
Assigned: el7cosmos » Unassigned
Status: Active » Needs review
el7cosmos’s picture

Title: 3228963-wrong-path-exception-message » Wrong path for Exception message in ThemeExtensionList
joachim’s picture

Status: Needs review » Reviewed & tested by the community

LGTM!

  • larowlan committed 764427c on 9.2.x
    Issue #3228963 by el7cosmos: Wrong path for Exception message in...
  • larowlan committed 9b0462f on 9.3.x
    Issue #3228963 by el7cosmos: Wrong path for Exception message in...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 9b0462f and pushed to 9.3.x. Thanks!

Because there's no risk of disruption here, I've backported this to 9.2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.