WordPress.org

Make WordPress Core

Opened 17 months ago

Last modified 4 weeks ago

#50233 reopened defect (bug)

Limit pagination for comments

Reported by: devrekli Owned by: SergeyBiryukov
Milestone: 5.9 Priority: normal
Severity: minor Version: 5.4.1
Component: Permalinks Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

you can look? please https://wordpress.org/support/topic/wordpress-infinite-link-problem/

Hello. WordPress has endless link problems for many years. Note: This problem happens when we paged comment example:

Others:

https://perishablepress.com/wordpress-infinite-duplicate-content/comment-page-2/
https://perishablepress.com/wordpress-infinite-duplicate-content/comment-page-2754/

others

https://www.wpbeginner.com/beginners-guide/how-to-properly-ask-for-wordpress-support-and-get-it/comment-page-2754/
https://www.wpbeginner.com/beginners-guide/how-to-properly-ask-for-wordpress-support-and-get-it/comment-page-5754/

others

https://www.isitwp.com/best-wordpress-404-error-plugins/comment-page-3754/
https://www.isitwp.com/best-wordpress-404-error-plugins/comment-page-5754/

Attention! There are no comments on these pages. But the links are entering the article. This is the problem for google search console.

If there is no comment, that link should not work. How can I fix this?

Paged comments from your admin panel. And you try too

If we do not paginate, this is no problem.

This problem happens in paginations..

If the setting is like this. screen shot: https://prnt.sc/smhi90

Attachments (4)

50233.patch (1.6 KB) - added by sumanm 12 months ago.
This patch adds page limitation for comments non existing page and redirect to parent post
50233.1.diff (2.5 KB) - added by sumanm 12 months ago.
added unit tests for comments limit pagination
50233.2.patch (2.2 KB) - added by mukesh27 11 months ago.
Minor changes
50233.3.diff (2.3 KB) - added by audrasjb 4 months ago.
patch refreshed against trunk, coding standards fixes and @since refresh

Download all attachments as: .zip

Change History (24)

#1 follow-up: @carike
17 months ago

  • Component changed from Canonical to Permalinks
  • Severity changed from critical to minor
  • Summary changed from WordPress Infinite link problem? to Limit pagination
How can I fix this?

:wave:
Hallo :)
As I indicated on the support forums, for a timely solution, you may want to consider hiring a developer to create a custom plugin, if this is important to you.

In terms of this Trac ticket:

The issue:
Paginated pages with no entries display the original post.
Here is an example: https://wordpress.org/support/topic/wordpress-infinite-link-problem/page/12345/

The proposed solution:
When a permalink is evaluated for a paginated URL, it should check if the particular page "exists" (contains entries), not just whether the post exists.
If there are no entries on the paginated URL, the visitor should be redirected to the original post's URL.

Last edited 17 months ago by carike (previous) (diff)

#2 in reply to: ↑ 1 @SergeyBiryukov
17 months ago

  • Milestone changed from Awaiting Review to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted
  • Summary changed from Limit pagination to Limit pagination for comments

Replying to carike:

The issue:
Paginated pages with no entries display the original post.
Here is an example: https://wordpress.org/support/topic/wordpress-infinite-link-problem/page/12345/

Just noting that particular issue is being tracked in #28081.

This ticket is a reporting a similar, but distinct issue for paginated comments, which was previously noted in comment:6:ticket:11694, but never addressed in that ticket.

Last edited 17 months ago by SergeyBiryukov (previous) (diff)

#3 @SergeyBiryukov
15 months ago

  • Milestone changed from 5.5 to 5.6

@sumanm
12 months ago

This patch adds page limitation for comments non existing page and redirect to parent post

#4 @sumanm
12 months ago

  • Keywords has-patch added

@sumanm
12 months ago

added unit tests for comments limit pagination

#5 @sumanm
12 months ago

  • Keywords has-unit-tests added

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


11 months ago

@mukesh27
11 months ago

Minor changes

#7 @mukesh27
11 months ago

In 50233.2.patch added some minor text and space changes.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


11 months ago

#9 @SergeyBiryukov
11 months ago

  • Milestone changed from 5.6 to 5.7

Didn't get a chance to review this in time for 5.6 RC, moving to the next release for now.

#10 @lukecarbis
8 months ago

  • Milestone changed from 5.7 to 5.8

This ticket was mentioned in Slack in #core by chaion07. View the logs.


5 months ago

#12 @chaion07
5 months ago

Thanks @devrekli for reporting the issue. We reviewed this ticket during a [recent triage session]https://wordpress.slack.com/archives/C02RQBWTW/p1622577969164000. It would be great if others can review the patch as well.

Drawing kind attention from @asif2bd as the component maintainer for Permalink. Thank you!

@audrasjb
4 months ago

patch refreshed against trunk, coding standards fixes and @since refresh

#13 @audrasjb
4 months ago

In 50233.3.diff, I refreshed the previous patch against trunk, fixed some coding standards issues and I refreshed @since mentions.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


4 months ago

#15 @whyisjake
4 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 51118:

Permalinks: Limit pagination for posts with comments.

Additionally, redirect pages back to the source page if comments don't exist.

Props devrekli, carike, sumanm, mukesh27, chaion07, audrasjb, whyisjake, SergeyBiryukov.

Fixes #50233.

#16 @whyisjake
4 months ago

In 51125:

Permalinks: Revert the changes stemming from pagination limits.

In [51118], an attempt was made to add pagination limits. The added tests need to be updated to ensure that they pass with the new changes.

Reverts [51118].

See #50233.

#17 @whyisjake
4 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#18 @whyisjake
4 months ago

  • Milestone changed from 5.8 to Future Release

#19 @SergeyBiryukov
4 months ago

  • Milestone changed from Future Release to 5.9

#20 @devrekli
4 weeks ago

you haven't fixed it for a long time

Note: See TracTickets for help on using tickets.