Error when visiting module config page: Parameter "bundle" for route "content_entity_clone.bundle.field_settings" must match "[a-z0-9_]+"

Created on 24 March 2023, over 1 year ago
Updated 21 February 2024, 9 months ago

After installing this module on Drupal 9.5 (Open Social distribution)
And visiting the page /admin/config/content_entity_clone

The website encountered an unexpected error. Please try again later.

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "bundle" for route "content_entity_clone.bundle.field_settings" must match "[a-z0-9_]+" ("closed_group-group_invitation" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 203 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute() (Line: 292)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 765)
Drupal\Core\Url->toString() (Line: 182)
Drupal\Core\Utility\LinkGenerator->generate() (Line: 95)
Drupal\Core\Render\Element\Link::preRenderLink()
call_user_func_array() (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 772)
Drupal\Core\Render\Renderer->doCallback() (Line: 363)
Drupal\Core\Render\Renderer->doRender() (Line: 201)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 196)
__TwigTemplate_56be85027a1d83e30847e7cb3171d698->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 422)
Drupal\Core\Render\Renderer->doRender() (Line: 201)
Drupal\Core\Render\Renderer->render() (Line: 241)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Yuri

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Yuri
  • First commit to issue fork.
  • @davisben opened merge request.
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States davisben NH

    I'm running into the same error. It is happening with the Group module enabled, because Group uses hyphens in bundles.

  • πŸ‡«πŸ‡·France troesler

    Hi
    I have a similar error, without the Group module installed.
    Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "bundle" for route "content_entity_clone.bundle.field_settings" must match "[a-z0-9_]+" ("menu-utilisateur" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 203 of core\lib\Drupal\Core\Routing\UrlGenerator.php).

  • Status changed to RTBC over 1 year ago
  • πŸ‡¦πŸ‡²Armenia murz Yerevan, Armenia

    I have this problem on clean Drupal 9.x installation after installing the "menu_item_extras" module and creating a menu with spaces in the name, something like "Test menu" (will be created "test-menu" bundle). And the hyphen in the menu machine name comes from Drupal Core, not from the contrib!
    After this I got the fatal error on the content_entity_clone settings page.

    And the fix from MR resolves the problem!

    Attaching a static patch file with those changes, to make it possible to use in composer until πŸ› GitLab Merge Requests Unable to Generate Incremental Patch Files Active is resolved.

  • First commit to issue fork.
  • Status changed to Fixed over 1 year ago
  • πŸ‡―πŸ‡΅Japan orakili

    New release available: 1.0.2 with the fix.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States sassafrass

    I'm still experiencing this issue. Using Drupal 10.2

    The website encountered an unexpected error. Try again later.

    Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "bundle" for route "content_entity_clone.bundle.field_settings" must match "[a-z0-9_-]+" ("~1" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 209 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

Production build 0.71.5 2024