admin menu editor array warnings
-
Hello,
Problem:
- When viewing Ultimate Dashboard => Admin Menu Editor tab, the following PHP warnings from a different plugin, “Posts 2 Posts”, appear in the debug logs:
[25-Feb-2026 17:04:28 UTC] PHP Warning: Undefined array key “toplevel” in /sites/WEBSITE/files/wp-content/plugins/posts-to-posts/vendor/scribu/scb-framework/AdminPage.php on line 454
[25-Feb-2026 17:04:28 UTC] PHP Warning: Undefined array key “menu_title” in /sites/WEBSITE/files/wp-content/plugins/posts-to-posts/vendor/scribu/scb-framework/AdminPage.php on line 458
[25-Feb-2026 17:04:28 UTC] PHP Warning: Undefined array key “capability” in /sites/WEBSITE/files/wp-content/plugins/posts-to-posts/vendor/scribu/scb-framework/AdminPage.php on line 459
/**
448 * Registers a page.
449 *
450 * @return void
451 */
452 public function page_init() {
453
454 if ( ! $this->args['toplevel'] ) {
455 $this->pagehook = add_submenu_page(
456 $this->args['parent'],
457 $this->args['page_title'],
458 $this->args['menu_title'],
459 $this->args['capability'],
460 $this->args['page_slug'],
461 array( $this, '_page_content_hook' )
462 );
463 } else {
464 $func = 'add_' . $this->args['toplevel'] . '_page';
465 $this->pagehook = $func(
466 $this->args['page_title'],
467 $this->args['menu_title'],
468 $this->args['capability'],
469 $this->args['page_slug'],
470 null,
471 $this->args['icon_url'],
472 $this->args['position']
473 );
474
475 add_submenu_page(
476 $this->args['page_slug'],
477 $this->args['page_title'],
478 $this->args['submenu_title'],
479 $this->args['capability'],
480 $this->args['page_slug'],
481 array( $this, '_page_content_hook' )
482 );
483 }
484
485 if ( ! $this->pagehook ) {
486 return;
487 }
488
489 add_action( 'load-' . $this->pagehook, array( $this, 'page_loaded' ) );
490
491 add_action( 'admin_print_styles-' . $this->pagehook, array( $this, 'page_head' ) );
492 }Steps to Reproduce:
- Install Posts 2 Posts
- Install Ultimate Dashboard
- Navigate to wp-admin => ultimate dashboard => admin menu editor
- Observe PHP warnings in log
Observations:
- These warnings only occur on the one page, oddly.
- The page is functional (we don’t have PRO, but the page loads fine).
- They appear to result from the other plugins framework expecting certain array keys (toplevel, menu_title, capability) that this plugin, Ultimate Dashboard, does not provide when instantiating AdminPage objects on this tab.
- These warnings are non-fatal and do not affect site operation.
- This seems to be an integration edge case.
- When did this start? Not sure, unfortunately. We don’t use this tab and only found the error from testing a new update for Ultimate Dashboard.
Environment Details:
- PHP 8.3
- WordPress v6.9.1
- Posts 2 Posts v1.7.6
- Ultimate Dashboard v3.8.13
I’ve also reported this with Posts 2 Posts. I couldn’t decide which plugin to notify, so I notified both. If you believe this is solely a Posts 2 Posts issue, please let me know and I will continue with them.
Thank you for your time.
You must be logged in to reply to this topic.