Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36355 new defect (bug)

Article URL redirects no longer working

Reported by: archanamandhare's profile archanamandhare Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Canonical Keywords:
Focuses: Cc:


On multiple sites, we have started using article URLs with the post ID in them. Historically, this has allowed WordPress to find the post and do a 301 redirect when the slug, date, or other parts of the URL path changed.

For example, Permalink - %year%/%vertical%/%category%/%postname%-%post_id%/

All of these URLs should redirect us to this article:

While the first 2 examples work correctly, the last 2 URLs land on 404 page inspite of correct %pagename%-%post_id% combination.

If we have Permalink - %year%/%vertical%/%category%/%postname%/

The last 2 structure work correctly and reach correct article page. For example -

Since we have a correct %postname%-%post_id% combination in the first Permalink structure URL, we should be able to reach the correct article page in the last 2 examples there too.

Change History (3)

#1 @archanamandhare
8 years ago

  • Component changed from General to Rewrite Rules

#2 @dd32
8 years ago

  • Component changed from Rewrite Rules to Canonical

@archanamandhare Welcome to Trac and thanks for the report!

Was 4.0 the last release under which you remember it working? Do you know when it stopped working?

#3 @archanamandhare
8 years ago

No. I tested right from tag 3.0, 3.4, 3.5, 3.8, 3.9, 4.0, 4.3 and current trunk. And found that links fail to land on correct article page with a %post_id% part of the permalink structure.

Since links do not have %post_id% in permalinks, similar link structure there work fine and give us the correct article page.

Note: See TracTickets for help on using tickets.