#54680 closed defect (bug) (fixed)
Site Editor: Adding 404 template causes rest_invalid_pattern
Reported by: | Bernhard Reiter | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Editor | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
Reported and fixed by GH user @PatelUtkarsh at https://github.com/WordPress/gutenberg/pull/37579.
Quoting the Gutenberg PR:
Adding 404 template from /wp-admin/site-editor.php?postType=wp_template
causes 400 with rest_invalid_pattern
- Theme without 404 templates.
- Open
/wp-admin/site-editor.php?postType=wp_template
- Add new 404 templates.
- Used nightly WordPress build to test this.
Screencast: https://user-images.githubusercontent.com/5015489/147066116-2e23ff30-0dd7-45d3-a40a-510ef06156e2.mp4
Change History (12)
This ticket was mentioned in PR #2077 on WordPress/wordpress-develop by ockham.
3 years ago
#1
- Keywords has-patch added
SergeyBiryukov commented on PR #2077:
3 years ago
#4
Thanks for the PR! This looks good to me. It would also be great to include a unit test for this, some other tests in the phpunit/tests/rest-api/wpRestTemplatesController.php
file could be used as a reference.
3 years ago
#5
Thanks for the PR! This looks good to me. It would also be great to include a unit test for this, some other tests in the
phpunit/tests/rest-api/wpRestTemplatesController.php
file could be used as a reference.
Sure, happy to add a test!
3 years ago
#7
Thanks a lot for reviewing @SergeyBiryukov @rachelbaker @hellofromtonya!
Since I don't have Core commit privileges myself, can I ask one of you kind souls to commit this? 😄
3 years ago
#8
Thanks a lot for reviewing @SergeyBiryukov @rachelbaker @hellofromtonya!
Since I don't have Core commit privileges myself, can I ask one of you kind souls to commit this? 😄
#9
@
3 years ago
- Owner set to audrasjb
- Status changed from new to accepted
Self assigning for commit.
#10
@
3 years ago
Worth noting this was already fixed in this commit: https://github.com/WordPress/wordpress-develop/commit/bd08b221273b8b367a18fef8c9efb873819ac89d#diff-d52bf95054b516a19c2a332fd0c85bdbab2cb8e5a25756a12b99128744262144
I'll only commit the unit tests :)
3 years ago
#12
Committed in https://core.trac.wordpress.org/changeset/52436
Backport of https://github.com/WordPress/gutenberg/pull/37579. Props @PatelUtkarsh.
Quoting https://github.com/WordPress/gutenberg/pull/37579:
Trac ticket: https://core.trac.wordpress.org/ticket/54680