D8 DS bug: Display suite in Drupal 8 causes parent theme's more specific templates to be ignored
The template matching a specific suggestion, shown as a suggestion in the Twig debug output, is there, it's just not being used.
What's suggested:
FILE NAME SUGGESTIONS:
* ds-1col--node--39.html.twig
* ds-1col--node-blog-card.html.twig
* ds-1col--node-blog.html.twig
* ds-1col--node-card.html.twig
* ds-1col--node.html.twig
x ds-1col.html.twig
x ds-1col.html.twig
What's used:
themes/contrib/octavia/src/templates/ds/ds-1col.html.twig
What's available:
ls -1 web/themes/contrib/octavia/src/templates/ds/
ds-1col.html.twig
ds-1col--node-box.html.twig
ds-1col--node-card.html.twig
ds-1col--node-media.html.twig
ds-1col--node-simple-card.html.twig
ds-1col--node-small-card.html.twig
ds-1col-wrapper.html.twig
ds-2col--group-teaser.html.twig
ds-2col.html.twig
ds-2col--node-people-full.html.twig
ds-2col--node-people-teaser.html.twig
ds-2col--node-teaser.html.twig
ds-2col--paragraph-update.html.twig
ds-3col-stacked.html.twig
In trying to find out what was going on i searched for:
drupal 8 theme not using expected templates
drupal 8 theme not using most specific template
Drupal 8 template listed twice used instead most specific
Drupal 8 theme template suggestions ignored when its subtheme enabled
display suite drupal 8 template does not work in parent theme
ds templates for more specific variations not used in parent themes
I committed the latest, 8.3-era, patch from this issue, "Incorrect order and duplicate theme hook suggestions" and it miraculously applied against 8.5.6 but did not solve what was causing this specific problem.
Also looked at "{% extends "foo.html.twig" %} in Twig templates does not respect theme inheritance" which could prove to be a problem for Drutopia but is not what i'm facing now.
Finally found it, by searching for Display Suite specifically: