Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Full Site Editing]: Include theme's templates in template list in post editor #41630

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

ntsekouras
Copy link
Contributor

What?

Fixes: #41617
Regression from: #41387

Why?

In the PR that caused the regression, I overrode the templates that were coming from get_page_templates(core) but that made the php theme templates lost. This PR fixes that by excluding only the needed templates.

Testing Instructions

  1. Add a php template in theme's templates directory.
<?php
/**
 * Template Name: Full-width Contained
 */
  1. Edit any page
  2. Observe that the php templates are in the list

Screenshots or screencast

_220609135830

@ntsekouras ntsekouras added [Type] Regression Related to a regression in the latest release [Feature] Full Site Editing [Feature] Template Editing Mode Related to the template editor available in the Block Editor labels Jun 9, 2022
@ntsekouras ntsekouras self-assigned this Jun 9, 2022
@ntsekouras ntsekouras force-pushed the fix/templates-list-in-post-editor branch from 1ff6d0b to 4f94b40 Compare June 9, 2022 16:23
@ntsekouras ntsekouras force-pushed the fix/templates-list-in-post-editor branch from 4f94b40 to cf5aab8 Compare June 9, 2022 16:35
Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested classic themes by adding theme support for block-templates to Twenty Twenty.
I tested block themes by adding a PHP template to Twenty Twenty-Two.
The PR solves the problem. The added context in the comment is clear.

@ntsekouras ntsekouras merged commit 14d039e into trunk Jun 10, 2022
@ntsekouras ntsekouras deleted the fix/templates-list-in-post-editor branch June 10, 2022 08:45
@github-actions github-actions bot added this to the Gutenberg 13.5 milestone Jun 10, 2022
@skorasaurus
Copy link
Member

Thanks for the quick repair on this; the regression had been affecting me as well; and I can also confirm this PR fixes the issues I experienced.

@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 2, 2022
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 13, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

@ntsekouras
Copy link
Contributor Author

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

This was a small regression so the fix restored the previous functionality. No need for dev note.

@ntsekouras ntsekouras removed the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor Needs User Documentation Needs new user documentation [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page templates are no longer displaying in editor
5 participants