Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "menu" for route "entity.menu.edit_form" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 193 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.menu.edit_form', Object, Array) (Line: 124)
Drupal\Core\Routing\UrlGenerator->getPathFromRoute('entity.menu.edit_form', Array) (Line: 68)
Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('entity.menu.edit_form', Array) (Line: 772)
Drupal\Core\Url->getInternalPath() (Line: 130)
Drupal\Core\Utility\LinkGenerator->generate('', Object) (Line: 94)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func(Array, Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 105)
__TwigTemplate_542a251cdd66cf7730cb7b9eb85ac5e2d26d1b280e8a7443ac36e7bc27ef70d7->getmenu_links(Array, Object, 1) (Line: 112)
__TwigTemplate_542a251cdd66cf7730cb7b9eb85ac5e2d26d1b280e8a7443ac36e7bc27ef70d7->getmenu_links(Array, Object, 0) (Line: 48)
__TwigTemplate_542a251cdd66cf7730cb7b9eb85ac5e2d26d1b280e8a7443ac36e7bc27ef70d7->doDisplay(Array, Array) (Line: 381)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 355)
Twig_Template->display(Array) (Line: 366)
Twig_Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/navigation/menu--toolbar.html.twig', Array) (Line: 384)

Comments

APolitsin created an issue. See original summary.

jordanpagewhite’s picture

Same. follow.

eme’s picture

Issue summary: View changes

Hello. Can you elaborate ? Tested against a fresh Drupal Core install with last stable version and I do not have any issue.

How do you reproduce this bug ?

jordanpagewhite’s picture

I am at work and don't have time to reproduce right now from a fresh install, but

my steps were:

1) update core from 8.0.5 to 8.2.3,
2) update admin_toolbar from 8.x-1.14 to 8.x-1.18

Also, degrading the version from 8.x-1.18 back down incrementally did nothing to help this issue. I'm probably just going to scrap my feature branch and start over when I jump back to that issue later.

Thanks.

ANDiTKO’s picture

I also get this error after updating Drupal core and AdminToolbar module.

Drupal from 8.2.2 to 8.2.4
Admin Toolbar (admin_toolbar) from 8.x-1.17 to 8.x-1.18

ANDiTKO’s picture

The problem is with admin_toolbar_tools

After doing "drush pmu admin_toolbar_tools" the site worked again.
And after doing "drush en admin_toolbar_tools" the site broke again.

kristofferwiklund’s picture

Same problem for me with latest 8.2.4

Disabling admin_toolbar_tools works for me as a temporary work around

eme’s picture

That's strange : it works perfectly when installing it on a 8.2.4 drupal install.

If you uninstall / reinstall admin toolbar tools, does it work again ?

Garryck’s picture

No, uninstalling/reinstalling admin toolbar tools does not fix the problem, for me.

eme’s picture

Can you provide the list of modules ? I think it may come from a module rather that from core as core + admin toolbar functions quite well.

ANDiTKO’s picture

StatusFileSize
new16.92 KB

I am now able to browse the site by uninstalling admin_toolbar_tools but i cant access the menu managment page at: /admin/structure/menu

The error i get on my watchdog is:
Notice: Undefined index: id in Drupal\Core\Config\Entity\Query\Query->Drupal\Core\Config\Entity\Query\@closure() (line 92 of /public_html/core/lib/Drupal/Core/Config/Entity/Query/Query.php).

and:
Drupal\Core\Entity\EntityMalformedException: The "menu" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\Entity->toUrl() (line 179 of /public_html/core/lib/Drupal/Core/Entity/Entity.php).

It might be a Drupal core bug after updating. Anyways im attaching a list of modules on my site as a txt coz its loooong.

sirclickalot’s picture

I see the same problem with a completely fresh install of Drupal 8.2.5 and admin_toolbar_tools 8.x-1.18.

The admin_toolbar 8.x-1.18 module by itself works fine but that's no good for my purposes.

I downgraded to 8.x-1.17 and installed afresh and both are working fine together.

eme’s picture

Tested again today fresh core 8.2.5 + admin toolbar & admin toolbar extra 8.18 and working perfectly on admin/structure/menu and menu admin edition.

Please tell me how to reproduce your bug to be able to fix it. Thanks.

ANDiTKO’s picture

StatusFileSize
new52.65 KB

Downgrading to 8.x-1.17 did not work for me.

Still getting this error:
Drupal\Core\Entity\EntityMalformedException: The "menu" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\Entity->toUrl() (line 179 of /core/lib/Drupal/Core/Entity/Entity.php).

Screenshot attached

ANDiTKO’s picture

Ok I've found a solution. It was something with the devel generated menus.

Here is the solution:
Manually enter the URL: YOURSITE.COM/admin/devel/menu/reset
and rebuild the menus.

If this dont work use drush:

drush pmu devel

Then execute a php command via drush by:
drush php

And run:
Drupal::configFactory()->getEditable('system.menu.devel')->delete();
Then quit the execution, by CTRL+C or CMND+C if you are on a mac

Then run

drush en devel -y
drush cr

Then try visiting: YOURSITE.COM/admin/devel/menu/reset

Before closing we must reproduce the error and automate the solution. It can be simple as
hook_update_N "if devel enabled then rebuild the menus using the devel function" or however its in D8.

romainj’s picture

Is this issue outdated by now?

romainj’s picture

Status: Active » Closed (cannot reproduce)
smulvih2’s picture

#15 worked for me. I experienced the same issue described here when updating the WxT distro, which upgraded Drupal core from 8.8.2 to 8.8.4. After uninstalling devel and running the PHP script, then enabling devel again, I was able to access 'admin/structure/menu'.

qqmyers’s picture

I also just hit this on 8.8.4 after using the devel module. On two other machines where I upgraded to 8.8.4 but haven't touched devel I had no problem. The fix in #15 - going through the drush commands worked.

jura12’s picture

#15 helped me. drupal 8.8.5, devel 8.x-2.1 , admin_toolbar 8.x-2.2

mrP’s picture

I ran into this on an upgrade from 8.x-2.0 to 8.x-2.2

avpaderno’s picture

Version: 8.x-1.18 » 8.x-1.x-dev
Kojo Unsui’s picture

I also ran in this issue solving a missing module mistake : while enabling a module, I saw that google_analytics was removed from composer.json but still enabled. So I re-required it with composer, then ran drush updb to execute the pending updates, and got the error.

#15 helped me to solve the issue. drupal 8.8.6, devel 8.x-2.1 , admin_toolbar 8.x-2.2.

Kojo Unsui’s picture

500 error : my last post was submitted twice.
I also ran in this issue solving a missing module mistake : while enabling a module, I saw that google_analytics was removed from composer.json but still enabled. So I re-required it with composer, then ran drush updb to execute the pending updates, and got the error. #15 helped me to solve the issue. drupal 8.8.6, devel 8.x-2.1 , admin_toolbar 8.x-2.2.