#44587 closed enhancement (duplicate)
Page variable is not compared to actual pages count on single post
Reported by: | ekatherine | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.7 |
Component: | Permalinks | Keywords: | has-patch |
Focuses: | Cc: |
Description
Since there's no check if page
value more than actual pages count (by this I mean the number of '<!--nextpage-->'
occurs), it's possible to create a billion of links with the same content but with different page
value. I even caught this bug on this blog: https://wordpress.org/news/2018/07/update-on-gutenberg/9999/
I guess it's not good for SEO.
I managed to fix this on my website (which is on the latest version 4.9.7) by editing the file wp/wp-includes/canonical.php, now it redirects user to the last available page (or removes page part from the address if there's only one page).
Attachments (1)
Change History (8)
#3
@
6 years ago
- Keywords needs-patch added; has-patch removed
Hi @ekatherine,
Enhancements usually don't get reviewed as quickly as bug reports do. However, if you do have a patch for this, you should upload it to this ticket because it is more likely to get reviewed by a core committer. I would be happy to test it for you once the patch is submitted.
Thanks
#4
@
6 years ago
- Keywords has-patch added; needs-patch removed
@ianbelanger thanks for your message!
Well, I'm sorry, it's just that I'm not sure that's not a bug :) And no one took a look to check if it's under the right category.
Ok. Here is my attachment. It's a modified wp-includes/canonical.php file. Tested it with the latest version and it worked fine for me.
#6
@
5 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi there, welcome to WordPress Trac! Thanks for the report, sorry it took so long for someone to get back to you.
Just noting that we're already tracking this issue in #45337 and #28081, so I'm going to close this one in favor of those tickets, as they have some more details in the comments. Also related: #48972.
I guess I have to wait much longer for this ticket to be reviewed?
Well, I think I can say I have a patch although it needs proper testing