We are currently having an issue where display suite templates are not being picked up from the parent theme.

If we move these templates from the parent theme to the child profile then they are picked up and rendered correctly.

An example of the names that aren't being picked up in the child template would be,

ds-reset--node-article-teaser.html.twig

Non display suite templates are being picked up fine.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adamclark-dev created an issue. See original summary.

adamclark-dev’s picture

Priority: Major » Normal
GRO’s picture

Patches DS to scan templates files across the active theme and all base themes.

See Display layout twig not overridable. For some background info.

aspilicious’s picture

I need a test for this so we don't brake it again in the future

realityloop’s picture

Issue summary: View changes
realityloop’s picture

Title: Parent profile template inheritance bug » Parent theme template inheritance bug
mlncn’s picture

Status: Active » Reviewed & tested by the community

May i humbly suggest that this is a critical and subtle enough bug (subtle = damn near impossible to track down, until guessing that it's a display-suite-specific problem) that this patch be incorporated ASAP to save many many hours of sleep, and *then* the issue for a test go forward?

This patch fixes this vexing issue.

swentel’s picture

Issue tags: +Needs tests

I agree that this might be extremely frustrating to track down, however, I agree with Aspilicious on this one re: tests.
I'll leave it RTBC so people can track it in the queue and know that it can be used as a patch which is valid, but won't commit it yet.
However, I'll come up with a test patch as soon as I can!

carma03’s picture

+1. Confirmed, #3 worked for me on Drupal 8.7.1 and PHP 7.3. Thanks!

gnuget’s picture

FileSize
1.75 KB

It seems that since #3123064: Prepare 8.x-3.x for Drupal 8.8 and 9 was merged this patch didn't apply anymore, so I rebase it.

New patch attached.

beunerd’s picture

@gnuget! Can't believe I was chasing my tail all this time trying to understand why my templates weren't available in a sub-theme. Thank you!

anruether’s picture

Abhijith S’s picture

Got this same issue when creating a subtheme.The patch #12 fixes the issue.Thank you.

swentel’s picture

Version: 8.x-3.x-dev » 5.0.x-dev
swentel’s picture

Status: Reviewed & tested by the community » Closed (outdated)

I've reworked some things in 5.0.x dealing with layout etc, see https://www.drupal.org/project/ds/issues/3123311#comment-14694708
One one the things is that I simply decided to kill suggestions that DS was exposing, I couldn't get my head around it anymore or other bugs that are clearly related to the theming system. DS (layouts) now follow(s) the layout discovery module pattern re: templates etc, so any bugs should be opened against core.

I guess #2911996: Layout template suggestions are not loaded properly is related - but can't tell for sure.

swentel’s picture

Note: I've bringing back suggestions, apparently we do use that at work a lot :)
The code in ds registry is still gone though, there are tests that at least prove that a template in another theme is picked, so I think that's covered. If there are still problems down the road, it's a core issue, likely with layout discovery or the theme system since the default theming hook now uses layout.