Wordpress-seo: [Critical] Deprecated filter `category_link`

Created on 1 Apr 2020  Â·  11Comments  Â·  Source: Yoast/wordpress-seo

  • [x] I've read and understood the contribution guidelines.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

With the release of WordPress 5.4, the category_link filter located at class-rewrite.php#L18 has been deprecated causing warnings to be printed on live sites.

Deprecated: category_link is deprecated since version 2.5.0! Use term_link instead. 

You can see plenty of sites have already started indexing with the error present: https://www.google.com/search?q=%22category_link+is+deprecated%22

This needs fixed immediately.

Please describe what you expected to happen and why.

N/A

How can we reproduce this behavior?

N/A

Technical info

N/A

Used versions

  • WordPress version: 5.4
  • Yoast SEO version: Latest
WP SEO issue major

Most helpful comment

Would the issue at hand not warrant a hot-fix before 14.0 considering it is already affecting sites in the wild?

I can't imagine having:

Deprecated: category_link is deprecated since version 2.5.0! Use term_link instead. 

spammed throughout your site if you don't have error reporting disabled for 2 weeks being ideal for SEO– not to mention it being rather frustrating in a development environment with debugging enabled.

Please reconsider and push a fix ASAP.

All 11 comments

See #14462

Looks like it was forgotten about.

@Log1x thanks for bringing this to our attention, I've verified the issue and passed it on to our product team.

The fix has been merged and will ship with 14.0 in 2 weeks. Since the fix is merged and I can't trigger issue closing with the fixes at this point, I'm closing this for now.

If there's any new information or questions, please feel free to leave acomment.

Would the issue at hand not warrant a hot-fix before 14.0 considering it is already affecting sites in the wild?

I can't imagine having:

Deprecated: category_link is deprecated since version 2.5.0! Use term_link instead. 

spammed throughout your site if you don't have error reporting disabled for 2 weeks being ideal for SEO– not to mention it being rather frustrating in a development environment with debugging enabled.

Please reconsider and push a fix ASAP.

Honestly if you run your site in development mode, this is the risk you run.

The issue that this happens on development environments too is real though. Discussing with the team.

13.4.1 has been released with this patch. Thanks again for your report and warnings.

Thanks for the hotfix

Appreciate the fix. Can we get it pushed to Premium as well (namely Composer)?

We'll look at that tomorrow @Log1x. Assuming you're not running this on a live site, and if you are and you're using composer, that you're smart enough to repress errors on the live site :)

(oh and for your development environments I heartily recommend Query Monitor which moves all these warnings to a spot where they're not as annoying)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garretthyder picture garretthyder  Â·  5Comments

tholu picture tholu  Â·  3Comments

isaumya picture isaumya  Â·  4Comments

Chouby picture Chouby  Â·  4Comments

Pcosta88 picture Pcosta88  Â·  6Comments