WordPress.org

Making WordPress.org

Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#5173 closed defect (fixed)

Centralise all the SEO fixes

Reported by: dd32 Owned by: dd32
Milestone: Priority: normal
Component: General Keywords: has-patch
Cc:

Description

Over the last year we've been closing a lot of random small SEO tickets, but overtime a lot of the changes have had different fixes in different locations, often missing edgecases.

This is an attempt at removing most of the common logic into a single location, with each site filtering the defaults when needed.

Unfortunately, this is more complex than I had expected for some sites (bbPress I'm looking at you).

Change History (21)

This ticket was mentioned in Slack in #bbpress by casiepa. View the logs.


6 months ago

#3 @johnjamesjacoby
6 months ago

Unfortunately, this is more complex than I had expected for some sites (bbPress I'm looking at you).

How can I be helpful?

If bbPress needs changes to help make SEO tweaks easier, let’s make them happen! ❤️

#4 @dd32
6 months ago

If bbPress needs changes to help make SEO tweaks easier, let’s make them happen! ❤️

Unfortunately it's not a simple change. I probably shouldn't have called out bbPress like that, o2 has similar problems, it was just a frustration point that had delayed me making this ticket for a few weeks.

There's two major pain points with bbPress, the first is that forums/topics/replies are not queried until they're displayed, which means that in order to output archive/noindex/etc in the header we have to trigger the queries earlier (See this code but search for // Populate bbpress() in that file for more. I'm 99% certain we cause everything to be queried twice when that happens too.
The second isn't bbPress's fault, it's the crazy amount of logic that is being requested to noindex things (you'll find more query triggering in there). I'm starting to think we'd be better off noindexing all of bbpress and selectively removing it..

The first would be helped greatly if it were altering the global $wp_query object rather than making it's own, but that would require a significant change in how bbPress works, and would mean it can't be embedded within other pages as easy, so not really an option, it's just something we have to deal with :)

#5 @dd32
6 months ago

Just a note that this ticket has been sitting while I've continued to test the code, picking up edge-cases and PHP warnings all the existing canonical code in different places have been generating.

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


6 months ago

#7 @dd32
5 months ago

In 9861:

Add the Generic SEO Fixes plugin.

See #5173.

#8 @dd32
5 months ago

In 9862:

Plugin Directory: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#9 @dd32
5 months ago

In 9863:

Support Forums: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#10 @dd32
5 months ago

In 9864:

Theme Directory: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#11 @dd32
5 months ago

In 9865:

Breathe: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#12 @dd32
5 months ago

In 9866:

Developer: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#13 @dd32
5 months ago

In 9867:

Login: Remove specific SEO fixes that are included in the generic SEO fixes plugin.

See #5173.

#14 @dd32
5 months ago

In 9868:

Remove the Facebook/twitter canonical redirect as it's included in the SEO fixes plugin, rename this so it's more obvious as it's purpose.

See #5173.

#15 @dd32
5 months ago

In 9869:

SEO Plugin: Handle taxonomy query requests that don't actually have a taxonomy query attached.

The plugin directory sometimes redirects taxonomy queries to be a post_meta-only query.

Avoids a PHP Warning: mu-plugins/pub/wporg-seo/canonical.php:67 - count(): Parameter must be an array or an object that implements Countable

See #5173.

#16 @dd32
5 months ago

In 9870:

Theme Directory: Switch to using get_queried_object() instead of get_post() due to get_post not returning correctly on the theme directory sometimes.

Also moves the outdated theme noindexing to it's own filter.

See #5173.
Fixes #4994.

#17 @dd32
5 months ago

In 9872:

SEO: Canonical: Only include the order param if it's a valid sort value.

See #5173, #5169.

#18 @dd32
5 months ago

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

Marking as fixed as no bugs have cropped up.

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


5 months ago

#20 @dd32
5 months ago

In 9936:

Theme Directory: Swap back to using get_post() now that it works as expected.

See [9935].
Reverts parts of [9870].
See #5173, #4994.

#21 @dd32
5 months ago

In 9940:

Developer: Remove the rel="canonical" implementation that can output incorrect links on some requests.
This will fall back to using the wporg-seo canonical implementation now instead.

See #5173.

Note: See TracTickets for help on using tickets.