Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#34357 closed defect (bug) (invalid)

Canonical redirects don't take endpoints into account

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Canonical Keywords: needs-unit-tests reporter-feedback needs-testing
Focuses: Cc:


Steps to reproduce:

  1. Publish a post and visit its /embed endpoint URL.
  2. Change your permalink structure.
  3. Visit the same URL again.

Note that the canonical redirect kicks in and redirects you to the correct permalink, but the /embed endpoint gets stripped.

It might be possible for redirect_canonical() to look at the registered rewrite endpoints and take them into consideration when performing a redirect.

Change History (3)

#1 @swissspidy
9 years ago

We had the same problem with wp_old_slug_redirect(), see #33920. Perhaps we can reuse some code from there.

#2 @rommelxcastro
8 years ago

  • Keywords reporter-feedback needs-testing added; needs-patch removed

@johnbillion - This seems to be fixed now, tested on WP version 4.8-alpha-39471 and works as expected.

Last edited 8 years ago by rommelxcastro (previous) (diff)

#3 @johnbillion
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for verifying, @rommelxcastro.

It looks like this might have been a false report. This works as expected in at least the last few version (past the point this ticket was created).

Note: See TracTickets for help on using tickets.