Opened 9 months ago
Closed 9 months ago
#64062 closed defect (bug) (reported-upstream)
Warning in render_block_core_navigation_submenu
| Reported by: | StephanR | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Hello,
There is a small “warning” bug in the “render_block_core_navigation_submenu” function.
If a user does not enter a URL in a navigation link (which unfortunately happens)
A “warning” is detected if the page is a post-type archive : the url attribute does not exist.
<?php wp-includes/blocks/navigation-submenu.php : if ( is_post_type_archive() ) { $queried_archive_link = get_post_type_archive_link( get_queried_object()->name ); if ( $attributes['url'] === $queried_archive_link ) { $is_active = true; } }
Could you please add an isset?
Best regards,
Stephan Renault
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I supposed it is an "undefined index" bug. Is that right?
Aside: since this is for a block, we'll need to make the fix in Gutenberg and it'll get synced to core.