ERROR - UnexpectedValueException: External URLs do not have internal route parameters.

Created on 19 December 2024, 6 days ago

When I visit the edit screen of a node, the following error message is recorded multiple times in the Drupal log:

UnexpectedValueException: External URLs do not have internal route parameters. in Drupal\Core\Url->getRouteParameters() (line 583 of \core\lib\Drupal\Core\Url.php).

What is causing this issue, and how can I fix it? The issue is not occurring on a separate website that still uses version 3.1.33 of this module.

🐛 Bug report
Status

Active

Version

3.1

Component

Miscellaneous

Created by

🇺🇸United States hockey2112

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

Comments & Activities

  • Issue created by @hockey2112
  • 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

    I cannot reproduce this. The error comes from Drupal core and not the PbT module. It could help, if you could check if there is more debug information in your log.

    * Do you have any link or url specific contrib modules installed?
    * important: Which field types does this node have? Is there the link field type?
    * Does this error come up on other node types?
    * Is this node protected by PbT via term relation?

  • 🇺🇸United States hockey2112

    * Do you have any link or url specific contrib modules installed?

    • link_attributes
    • extlink

    * important: Which field types does this node have? Is there the link field type?

    • For simplicity's sake, I tested for this issue on a "Blog Post" content type that only has the Body field. The same error occurs. When I edit that node, it does show the "Permissions by Term" sidebox, but that is correct behavior (right?).

    * Does this error come up on other node types?

    • Yes

    * Is this node protected by PbT via term relation?

    • In the case of the Blog Post test above, no.
  • 🇺🇸United States hockey2112

    Here is the entire error from my logs:

    UnexpectedValueException: External URLs do not have internal route parameters. in Drupal\Core\Url->getRouteParameters() (line 583 of C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\Url.php).

    #0 C:\xampp\htdocs\mysite\public_html\modules\contrib\permissions_by_term\src\Controller\NodeEntityBundleController.php(139): Drupal\Core\Url->getRouteParameters()
    #1 C:\xampp\htdocs\mysite\public_html\modules\contrib\permissions_by_term\src\Controller\NodeEntityBundleController.php(110): Drupal\permissions_by_term\Controller\NodeEntityBundleController->getContentType('/mysite/public_ht...')
    #2 [internal function]: Drupal\permissions_by_term\Controller\NodeEntityBundleController->getFormInfoByUrl()
    #3 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
    #4 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\Render\Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #5 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #6 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
    #7 C:\xampp\htdocs\mysite\vendor\symfony\http-kernel\HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #8 C:\xampp\htdocs\mysite\vendor\symfony\http-kernel\HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #9 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 C:\xampp\htdocs\mysite\public_html\core\modules\big_pipe\src\StackMiddleware\ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 C:\xampp\htdocs\mysite\public_html\core\modules\page_cache\src\StackMiddleware\PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #14 C:\xampp\htdocs\mysite\public_html\core\modules\page_cache\src\StackMiddleware\PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #15 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #16 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #17 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #18 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #19 C:\xampp\htdocs\mysite\public_html\core\lib\Drupal\Core\DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #20 C:\xampp\htdocs\mysite\public_html\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #21 {main}
  • 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

    Thanks for sharing this information. I am really not able to reproduce your issue. I've also installed link_attributes and the exlink modules. Then I added a linkfield to my node. I was able to edit the node, without any exception.

    Maybe you can solve your issue by checking the PHP version. Please make sure, that you are using a supported PHP version. I recommend using the latest stable PHP version: 8.3. The oldest supported PHP version is 8.1.

    I have seen, that you are working with XAMPP on Windows. I really recommend using DDEV: https://ddev.com/. On Windows you can use DDEV via WSL2. This works pretty well.

Production build 0.71.5 2024