Radix starter kit templates are discoverable by Drupal

Created on 11 September 2024, 6 months ago

Problem/Motivation

When we want to use the same template and layout for the front page and other site's pages we just have a page.html.twig template. In radix there is a page-front.html.twig.
In the radix starter kit (and the generated subthemes) there is a page-front.html.twig.
If we remove it to use the same template for all page Drupal grab the radix starterkit one
<!-- BEGIN OUTPUT from 'themes/contrib/radix/src/kits/radix_starterkit/templates/page/page--front.html.twig' -->

Steps to reproduce

Just delete the page-front.html.twig of your current radix generated theme and Drupal will not grab the page.html.twig template of the theme (default behavior) but the page-front.html.twig of the starterkit inside radix theme.

Proposed resolution

I've tried with a hidden: true in the starterkit.info but doesn't block the discovery of the template by Drupal.
This is maybe a core issue with starterkits.
Otherwise a local solution could be to remove derivated templates into the starterkit with just root templates.
But don't estimate the impacts.

πŸ› Bug report
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡«πŸ‡·France wwwahe

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

Comments & Activities

  • Issue created by @wwwahe
  • Seems to be sth that needs to be addressed in core, will investigate further later on

  • Marking this as postponed for now since it seems to be a core issue, will open up an issue in core

  • Status changed to Closed: works as designed about 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States danchadwick Boston

    I can confirm that the starter kit templates are discoverable. Therefore the solution would be to retain the subtheme's template, or change the suggestions to remove the template that is being found in the starterkit. This is a theme system issue, rather than a radix issue.

    Closing as "works as designed" because the radix parts works and there's no option for "not my problem".

Production build 0.71.5 2024