#58823 closed defect (bug) (fixed)
Editor: Incorrect error handling when converting classic to block menus
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.3.1 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Editor | Keywords: | has-patch has-unit-tests commit fixed-major dev-reviewed |
Focuses: | Cc: |
Description
Originally filed as https://github.com/WordPress/gutenberg/issues/52481:
Some errors that can occur when WP_Navigation_Fallback::create_classic_menu_fallback()
calls WP_Classic_To_Block_Menu_Converter::convert()
aren't handled as accurately as they could be.
::convert()
can return aWP_Error
object, but this error object won't be detected by theempty()
check in::create_classic_menu_fallback()
. TheWP_Error
return type is also missing from the docs.::convert()
returns an array instead of a string when no menu items are returned bywp_get_nav_menu_items()
.
Change History (22)
This ticket was mentioned in PR #4858 on WordPress/wordpress-develop by dlh01.
2 years ago
#1
- Keywords has-patch added
@get_dave commented on PR #4858:
2 years ago
#2
@get_dave commented on PR #4858:
2 years ago
#3
This will also resolve https://github.com/WordPress/gutenberg/issues/52481
#6
@
2 years ago
This PR seems to be ready to land. Are any core contributors available to help merge?
#7
@
2 years ago
- Keywords has-unit-tests added
- Milestone changed from Awaiting Review to 6.3.1
- Owner set to hellofromTonya
- Status changed from new to reviewing
#10
@
2 years ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport to 6.3.x consideration.
Pinging @azaozz.
@hellofromTonya commented on PR #4858:
2 years ago
#11
Committed via https://core.trac.wordpress.org/changeset/56422. Thank you everyone for your contributions!
#12
follow-up:
↓ 13
@
2 years ago
@azaozz I moved this fix into 6.3.1 as it was introduced in 6.3.0. It might not be severe enough to be bundled into the .1 minor and could likely wait until .2 minor. Take a look and see what you think.
#13
in reply to:
↑ 12
@
2 years ago
Replying to hellofromTonya:
Thanks for the ping! Looking at [56422] it seems simple and straightforward enough to add to 6.3.1. The only thing I'm a bit unsure is whether it affects a lot of people, i.e. if it is a higher priority fix.
#15
@
2 years ago
I don't think it's a high priority issue, but given the minimal scope of the patch I think we can safely include this bugfix in 6.3.1.
#16
@
2 years ago
- Owner hellofromTonya deleted
- Status changed from reopened to reviewing
Removing myself as owner, just in case I'm not available to do the backport to the 6.3-branch, once approved for backport.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
#18
@
2 years ago
- Keywords dev-reviewed added; dev-feedback removed
As per today's bug scrub, marking this as reviewed.
#19
@
2 years ago
- Owner set to audrasjb
- Status changed from reviewing to accepted
Self assigning for backport
Thank you for this PR and catching those Issues. Looks like the unit tests will need updating to conform to the changes. Do you think you will be able (have capacity) to do that?
Also cc'ing @spacedmonkey as he may need to oversee this being merged into Core.