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:

Description

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: http://variety.com/2016/tv/news/the-loud-house-premiere-date-video-nickelodeon-1201740128/

http://variety.com/2015/tv-news/news/the-loud-house-premiere-date-video-nickelodeon-1201740128/
http://variety.com/2015/tv-news/news/test-url-slug-1201740128/
http://variety.com/the-loud-house-premiere-date-video-nickelodeon-1201740128/
http://variety.com/2016/the-loud-house-premiere-date-video-nickelodeon-1201740128/

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 - http://hollywoodlife.com/2016/03/28/lip-sync-battle-the-walking-dead-sasha-vs-maggie-video/

http://hollywoodlife.com/lip-sync-battle-the-walking-dead-sasha-vs-maggie-video/
http://hollywoodlife.com/2013/lip-sync-battle-the-walking-dead-sasha-vs-maggie-video/

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 variety.com links fail to land on correct article page with a %post_id% part of the permalink structure.

Since Hollywoodlife.com 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.