Issue with OC v1 backend navigation registration

Hi,
I am trying to upgrade an old oc v1 app, and I cant seem to enter the backend anymore due to this error:

Invalid menu item detected in Asme.Awards. Contact the plugin author to fix (The awards-menu.url field is required.)
/Users/christophevidal/Sites/oc-asme/modules/backend/Classes/NavigationManager.php line 202

the navigation menu items are defined in the plugin.yaml.

navigation:
    awards-menu:
        label: 'asme.awards::lang.plugin.navigation.menu'
        url: asme/awards/awards
        icon: icon-trophy
        permissions:
            - 'awards.*'
        order: '202'

Hi @chris

This is caused by some validation code that we removed in v3. You could patch the v1 site by removing it.

  1. Open modules/backend/classes/NavigationManager.php
  2. Find method registerMenuItems
  3. Replace the method definition with the following code
public function registerMenuItems($owner, array $definitions)
{
    if (!$this->items) {
        $this->items = [];
    }

    $this->addMainMenuItems($owner, $definitions);
}

That should suppress the error.

alright, thanks @daft it seems to remove the error.
however, I can enter the backend anyway, i wam redirect to the frontend immediately.
no error in the log.