Opened 12 months ago
Last modified 12 months ago
#57289 new defect (bug)
Allow child themes to use template parts from parent themes in Full Screen Editor
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.1.1 |
Component: | Editor | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Creating template parts in a theme for the Full Site Editor does not allow template parts from a parent theme to be used by a child theme. These will show when editing a template, and allow you to insert/update/delete them when editing templates, but an error message shows on the public-facing page - "Template part has been deleted or is unavailable: *template-name*".
All that is needed is an additional check if a child theme is active and if so check against the parent theme as well as the child theme.
Attachments (1)
Change History (4)
This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.
12 months ago
#3
@
12 months ago
- Keywords reporter-feedback added
Welcome back to Trac, @catacaustic, and thanks for the report!
This issue looks similar to https://github.com/WordPress/gutenberg/issues/44243, where a workaround was to remove the theme name from <!-- wp:template-part -->
. For instance, change:
<!-- wp:template-part {"slug":"header","tagName":"header","theme":"my-theme"} /-->
to
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
Would you mind testing to see if this also fixes the errors you're seeing? Your proposed patch may offer a solution there as well. Thank you!
Diff file