Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#58670 closed defect (bug) (invalid)

block_core_navigation_submenu_build_css_colors function has been removed since 6.3 beta2

Reported by: manooweb's profile manooweb Owned by:
Milestone: Priority: high
Severity: critical Version: 6.3
Component: Editor Keywords:
Focuses: Cc:

Description

This public function has been removed from the latest beta release without any deprecation.

The pull request that removed this function is https://github.com/WordPress/gutenberg/pull/48936

At the opposite of this other PR https://github.com/WordPress/gutenberg/pull/49064 where it is written a deprecation had to be done, it seems it wasn't the case.

So as we use this function in one of our block that we could insert as subblock navigation, we now have a php Fatal Error

[29-Jun-2023 10:45:40 UTC] PHP Fatal error: Uncaught Error: Call to undefined function block_core_navigation_submenu_build_css_colors()

Detected our PHPunit test in our side.

Change History (10)

#1 follow-up: @sabernhardt
18 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.3
  • Priority changed from normal to high

This may need to be fixed in the plugin first, as [56098] was.

The function is gone, but the docblock remains. If the function should be deprecated instead of returning it where it had been, the since note would be WordPress 5.9.0 ([52069]).

#2 @albatross10
18 months ago

Hello @manooweb

To get this straight, I see that the doc block has also been removed. Now for the further work, do we have to bring back the function again and add a deprecation ?

#3 @manooweb
18 months ago

Hello @albatross10,

Yes! The goal is to avoid to have a PHP Fatal Error and leave enough time to plugins development team as us to fix by replacing by the wp_apply_colors_support() if I correctly understood.

Thanks.

#4 @hugod
18 months ago

Hi,
There is another problem regarding the function deletion.
Plugin can safely avoid using it in a new version.
But user may not update it just in time along WordPress 6.3 leading to fatal error (potentially on a lot of sites).

#5 in reply to: ↑ 1 @manooweb
18 months ago

Replying to sabernhardt:

This may need to be fixed in the plugin first, as [56098] was.

The function is gone, but the docblock remains. If the function should be deprecated instead of returning it where it had been, the since note would be WordPress 5.9.0 ([52069]).

Also reported in Gutenberg project https://github.com/WordPress/gutenberg/issues/52244 cc @audrasjb

#6 follow-up: @sabernhardt
18 months ago

  • Keywords needs-patch removed

This could be fixed by changeset:56126

#7 in reply to: ↑ 6 @manooweb
18 months ago

Replying to sabernhardt:

This could be fixed by changeset:56126

Thank you.

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


18 months ago

#9 follow-up: @mukesh27
18 months ago

  • Milestone 6.3 deleted
  • Resolution set to invalid
  • Status changed from new to closed

This ticket was discussed during the bug scrub.

@manooweb The issue is now resolved. Mark ticket as invalid. feel free to reopen if you face the same issue. Thanks!

#10 in reply to: ↑ 9 @manooweb
18 months ago

Replying to mukesh27:

This ticket was discussed during the bug scrub.

@manooweb The issue is now resolved. Mark ticket as invalid. feel free to reopen if you face the same issue. Thanks!

Ok. I saw however changeset is not yet commited.

edit > Sorry I didn't see that the function was moved to wp-includes/deprecated.php 😴

Last edited 18 months ago by manooweb (previous) (diff)
Note: See TracTickets for help on using tickets.