WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#51001 new defect (bug)

Numbers at the end of the URL are removed

Reported by: dmwebhosting Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Permalinks Keywords: close
Focuses: Cc:

Description

Before upgrading to 5.5, the site was at 5.4.2 and the url worked with no issue
https://example.come/show-listings/654493

Upgrading to 5.5, the above URL gets changed and it removes the numbers at the end of the URL. If I put a question mark before the number like
https://example.com/show-listings/?654493 the page loads with my data being displayed.

I would like to keep the same format like it was in 5.4.2
Another user is having the same issue, see link to the forum below.

https://wordpress.org/support/topic/wp-5-5-problems-with-permalinks/

Change History (2)

#1 @SergeyBiryukov
3 months ago

  • Keywords close added
  • Summary changed from WP 5.5 Permalinks to Numbers at the end of the URL are removed

Hi there, welcome to WordPress Trac! Thanks for the report.

Either [47727] / #40773 or [47760] / #45337 would be the possible culprit here. I'm sorry to hear this is causing issues since the latest update.

That said, the /example/123/ URL structure is reserved in WordPress for pagination, it's used to display parts of a post separated with the <!--nextpage--> tag, and is not meant to be used for any other purpose.

So I would recommend changing the numeric part of the /show-listings/654493 request to something else, perhaps /show-listings/?654493 if that works, to avoid conflicts.

As another possible solution, you can disable the redirect_canonical() function for these requests, that is attached to the template_redirect action by default.

#2 @xberg
3 months ago

Thanks for opening the ticket here.
Yes: I also have this issue. I was not aware of the "proper" use of /1/

I use the structure mysite.com/albums/1/ ... for pagination accross my site for years: for albums, contests, photo galeries, messages...
Yes: I could reprogram my pagination function to read ?page=1 but it's going to take a few hours.
Is there any chance this will be patched in a new version or am I better off making the corrections and stop using the /1/ for something else than originally intended?

Note: See TracTickets for help on using tickets.