WordPress.org

Making WordPress.org

Opened 9 months ago

Closed 8 weeks ago

#4325 closed defect (fixed)

Pagination and rel next/prev links should build from the canonical, not the request

Reported by: jonoaldersonwp Owned by: dd32
Milestone: Priority: lowest
Component: General Keywords: seo analytics
Cc:

Description (last modified by jonoaldersonwp)

Pagination links on templates like https://wordpress.org/support/plugin/eshop/page/20/?sausage=dog carry the query parameter through.

These links should instead be constructed from the canonical URL tag, rather than from the query/request.

E.g., the link to page 19 on https://wordpress.org/support/plugin/eshop/page/20/?sausage=dog should be https://wordpress.org/support/plugin/eshop/page/19/.

Additionally, rel next/prev tags in the head also carry the query; these should be built from the canonical.

E.g., the rel prev/next links on https://wordpress.org/plugins/tags/facebook/page/3/?qEGgVZWOMY6QuASuwpvADg&ved=0CD0QFjAHOGQ&usg=AFQjCNE96Vqc6usb8znBhhw9tvxNe3pKUw should be https://wordpress.org/plugins/tags/facebook/page/4/ and https://wordpress.org/plugins/tags/facebook/page/2/ respectievely.

Change History (5)

#1 @jonoaldersonwp
9 months ago

  • Component changed from Support Forums to General
  • Description modified (diff)
  • Summary changed from Pagination links should build from the canonical, not the request to Pagination and rel next/prev links should build from the canonical, not the request

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


7 months ago

#3 @dd32
7 months ago

  • Owner set to dd32
  • Status changed from new to accepted

#4 @dd32
8 weeks ago

In 9190:

Plugin Directory: Use our own canonical url rather than trusting core to produce the correct link.

See #4325.

#5 @dd32
8 weeks ago

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

Pagination links on templates like https://wordpress.org/support/plugin/eshop/page/20/?sausage=dog carry the query parameter through.

These appear to be from bbp_paginate_links() which I believe is fixed in the upcoming bbPress 2.6 release.
We'll wait for bbPress here.

Additionally, rel next/prev tags in the head also carry the query; these should be built from the canonical.

These don't appear to be a problem in the above link, which is the support forums, but the example url was the plugin directory.

Fixed the plugin directory in [9190].

Note: See TracTickets for help on using tickets.