Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • D Drutopia distribution
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 155
    • Issues 155
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DrutopiaDrutopia
  • Drutopia distribution
  • Issues
  • #206
Closed
Open
Issue created Aug 15, 2018 by benjamin melançon@mlncn🛠Owner

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:

Display Suite: Parent theme template inheritance bug

Edited Aug 15, 2018 by benjamin melançon
Assignee
Assign to
Time tracking