roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.75k stars 3.06k forks source link

oEmbed templates do not get inherited with Sage10 #2782

Closed trajche closed 2 years ago

trajche commented 3 years ago

Description

embed.php is not inherited from the resources/views/ directory as are the rest of the templates.

Steps to reproduce

  1. Create a new Sage10 project
  2. Take any link from your website that's a content type: post
  3. Paste it in the editor (tested with Gutenberg, but same issue will occur in Classic)
  4. This should oEmbed the link and you will see the preview
  5. Try to override the template by adding a file: /resources/views/oembed.blade.php (it won't work)
  6. Add a oembed.php file directly under the theme directory (it will work)

Expected behavior: [What you expect to happen]

It's expected that at Step 5 the theme will inherit the oembed.blade.php.

Actual behavior: [What actually happens]

It does not and it falls back to /wp-includes/theme-compat/oembed.php

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

Sage 10

Additional information

Template hierarchy page on WordPress, explains the inheritance on default themes. https://developer.wordpress.org/themes/basics/template-hierarchy/#embeds

huubl commented 3 years ago

I think this is related to:

https://github.com/roots/acorn/pull/101