Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#49755 closed defect (bug) (duplicate)

Deprecation error after update to 5.4

Reported by: codecoruan's profile codecoruan Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.4
Component: Taxonomy Keywords:
Focuses: Cc:

Description

I updated to 5.4 today on my development site and noticed a deprecation error:
Deprecated: category_link is <strong>deprecated</strong> since version 2.5.0! Use term_link instead. in ..\wp-includes\functions.php on line 5088.

I searched all my plugins and all I found was the function "get_term_link" throws this error incorrectly in ..\wp-includes\taxonomy.php on line 4268. I'm assuming it is being thrown incorrectly as I can't find anywhere else or any other reason it would throw this error.

Upon Googling the error, I found quite a few websites that are throwing this error and they haven't realised that this is happening after the update (again assuming as some of the posts were released today where the error appears).

Change History (9)

#1 @pbiron
3 years ago

Welcome to Trac @codecoruan.

I think what you are reporting is covered in #49738. Can you please check?

#2 @TimothyBlynJacobs
3 years ago

  • Keywords reporter-feedback added

Thanks for the ticket and welcome to trac @codecoruan!

Do you have any code that is doing something like add_filter( 'category_link' )? That deprecation error gets sent when a plugin is actually using that category_link filter. Not just from calling the function get_term_link.

#3 @SergeyBiryukov
3 years ago

  • Component changed from General to Taxonomy

#4 @codecoruan
3 years ago

Hi there, it seems the Yoast SEO plugin is calling that filter. I wasn't sure that the filter actually triggers this error.

Thanks for clearing that up. I'll wait for Yoast to update before actually updating to 5.4 on my live site.

#5 @afercia
3 years ago

@codecoruan thanks for your report.

I updated to 5.4 today on my development site

Do you have Yoast SEO activated and debug mode turned on? If so, Yoast promptly released version 13.4.1 of their plugin to solve this issue. Worth noting this warning shouldn't happen on production sites, where debug mode is (likely) turned off.

#6 @afercia
3 years ago

I see you clarified a few seconds before my comment while I was still typing :) Can you please confirm upgrading Yoast SEO solved the issue for you?

#7 @codecoruan
3 years ago

@afercia Thanks for this. I can see there is an update for Yoast. I will update and let you guys know if the issue still persists. But I am sure it will resolve it.

Thanks for your assistance.

#8 @SergeyBiryukov
3 years ago

Created #49759 to consider un-deprecating category_link and tag_link filters.

#9 @SergeyBiryukov
3 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #49738.

Note: See TracTickets for help on using tickets.