-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Template Activation: Use string IDs when experiment is off #73585
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +6 B (0%) Total Size: 2.54 MB
ℹ️ View Unchanged
|
|
Hm, so this needs to be included in WP 6.9, no? |
|
Adding it to the board just in case. |
|
Actually, I forgot that we did a full revert on the wp/6.9 branch 😅 |
|
I've moved this new test to its own suite and made sure it's testing the correct flow (this error only happens if you edit a template via the "Edit template" link when editing a page). This should be ready for another review 🙇 |
scruffian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working for me. Good idea adding a test for too.
|
Flaky tests detected in 0dbb7d6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19739128836
|
* Check for experiment before passing wp_id * Add tests to cover template ID format * Remove fallbacks * Fallback to id when experiment enabled * Move test to its own suite * Fix missing optional chaining * Update test * Include error message in test * Use correct page flow in test * Update comment * Reduce duplication * Fix test * Improve how dialogues are dismissed * Refactor tests * Split into two tests * Forcefully close welcome guide * Address nits * Use welcomeGuideTemplate Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org>
|
I just cherry-picked this PR to the release/22.2 branch to get it included in the next release: 8a407e4 |
What?
This fixes a "No templates exist with that id." error when editing templates via a Page, i.e. clicking on "Edit template" in the block inspector, noticed in GB 22.1:
Why?
When the Template Activation experiment is disabled, we should pass the string ID format (theme//slug) rather than the numeric
wp_id.How?
Checks if the experiment is enabled before deciding to use the slug or ID. Also added some e2e tests to cover this scenario.
Testing Instructions