• Am on WordPress 4.9.9 and constantly getting this:

    PHP Notice: Undefined property: stdClass::$ID in /home/…../…../wp-content/plugins/nav-menu-roles/nav-menu-roles.php on line 422

    When will you be ready for WP 5.0.2? Otherwise, love your plugin – thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    Is your theme adding a menu item that is not a page/post, or not added via the Nav Menu editor? The wp_setup_nav_menu_item filter passes through a menu item object that if created in the menu editor should always have an ID. Note, if it doesn’t have an ID then it’s not possible to save the “Roles” as meta. I had not anticipated that kind of use case, but I should be able to add a quick conditional check to avoid the notice.

    As far as 5.0 compatibility, the bulk of 5.0 is related to the new editor Gutenberg, which doesn’t seem to effect the menu editor yet. It should be fine, and looks ok in my quick test. You can always use a staging site (WP Staging) to do a more complete test of your upgrades before going live.

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined property’ is closed to new replies.