[wp-trac] [WordPress Trac] #64062: Warning in render_block_core_navigation_submenu

WordPress Trac noreply at wordpress.org
Wed Oct 1 08:35:22 UTC 2025


#64062: Warning in render_block_core_navigation_submenu
--------------------------+-----------------------------
 Reporter:  StephanR      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 <?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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64062>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list