[wp-trac] [WordPress Trac] #37336: Pre-existing page with slug /embed/ does not work as described
WordPress Trac
noreply at wordpress.org
Tue Jul 12 07:17:12 UTC 2016
#37336: Pre-existing page with slug /embed/ does not work as described
------------------------------------------+------------------------------
Reporter: smerriman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 4.5
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------------------
Changes (by swissspidy):
* keywords: => needs-patch needs-unit-tests
* version: trunk => 4.5
Old description:
> In #34931, embeds were added to static frontpages, and there was a
> discussion of how this would affect an existing page with a slug of
> /embed/.
>
> The solution was:
>
> - an existing page with slug /embed/ will work as is and disable the
> pretty embed URL
> - new pages can't be created with a slug of /embed/.
>
> However, this did not work properly. On a site of mine, there is a page
> with URL /embed/ that was working fine prior to this upgrade. Now:
>
> - if you visit /embed/, you are redirected to the homepage.
> - if you attempt to edit the page, the slug previews as /embed-2/,
> meaning editing the page content and saving has the unwanted side effect
> of forcing the URL to change and all links to the page to break without
> warning.
>
> Suggested changes:
>
> - fix whatever is incorrectly redirecting the URL
> - allow a slug of /embed/ to continue to save as-is if it already exists.
New description:
In #34971, embeds were added to static frontpages, and there was a
discussion of how this would affect an existing page with a slug of
/embed/.
The solution was:
- an existing page with slug /embed/ will work as is and disable the
pretty embed URL
- new pages can't be created with a slug of /embed/.
However, this did not work properly. On a site of mine, there is a page
with URL /embed/ that was working fine prior to this upgrade. Now:
- if you visit /embed/, you are redirected to the homepage.
- if you attempt to edit the page, the slug previews as /embed-2/, meaning
editing the page content and saving has the unwanted side effect of
forcing the URL to change and all links to the page to break without
warning.
Suggested changes:
- fix whatever is incorrectly redirecting the URL
- allow a slug of /embed/ to continue to save as-is if it already exists.
--
Comment:
Thanks for your report! I could reproduce this by manually changing a
post's slug in the database (simulating an already existing post with that
slug).
This means a visitor cannot access a post with that slug, which is of
course a no-go.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37336#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list