-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
PRs to backport to Gutenberg 8.3 #23026
Merged
Merged
Commits on Jun 9, 2020
-
Edit Site: Fix template lookup (#22954)
## Description This PR fixes two issues with template lookup: ### 1. Templates with `index.html` block template fallback When using a theme that came with an `index.html` but not with a `front-page.html` block template, the site editor would show the following `Notice: Undefined index: front-page in /var/www/html/wp-content/plugins/gutenberg/lib/edit-site-page.php on line 162`. The reason is that I was setting the wrong key here: https://github.com/WordPress/gutenberg/blob/710373b254fbcd15d524afdeb31da0d93c4defd4/lib/edit-site-page.php#L158 This would use the name of the template that was _found_, not the name of the key that was looked for. So if we're looking up `front-page`, but don't find any template, and [thus fall](https://github.com/WordPress/gutenberg/blob/710373b254fbcd15d524afdeb31da0d93c4defd4/lib/template-loader.php#L226) back to `index`, the template will be stored under the `index` key, rather than the front-end one. The fix for this is to use the template we were looking for as key (rather than the name of the template we actually found). ### 2. Templates without `index.html` block template fallback When using a theme that doesn't come with any block templates at all, we need to provide a blank `index` template when the user first opens the site editor (see [discussion](#22893 (comment))). Co-authored-by: Enrique Piqueras <epiqueras@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for fe867fc - Browse repository at this point
Copy the full SHA fe867fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5aae0c2 - Browse repository at this point
Copy the full SHA 5aae0c2View commit details -
Revert "Image Block: add caption field to placeholder (#22295)" (#23027)
This reverts commit 2f1a8e7.
Configuration menu - View commit details
-
Copy full SHA for cbd8168 - Browse repository at this point
Copy the full SHA cbd8168View commit details
Commits on Jun 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 36a82b2 - Browse repository at this point
Copy the full SHA 36a82b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for edd887c - Browse repository at this point
Copy the full SHA edd887cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50c02ef - Browse repository at this point
Copy the full SHA 50c02efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 395cecf - Browse repository at this point
Copy the full SHA 395cecfView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.