Regression: After updating to 2.0.2, broken links report doesn't work

Created on 30 June 2025, about 1 month ago

Problem/Motivation

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of .../web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

#0 .../web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(260): Drupal\Core\Entity\EntityTypeManager->getDefinition()
#1 .../web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(195): Drupal\Core\Entity\EntityTypeManager->getHandler()
#2 .../web/modules/contrib/linkchecker/src/Entity/LinkCheckerLink.php(186): Drupal\Core\Entity\EntityTypeManager->getStorage()
#3 .../web/modules/contrib/linkchecker/src/LinkCheckerLinkAccessControlHandler.php(68): Drupal\linkchecker\Entity\LinkCheckerLink->getParentEntity()
#4 .../web/modules/contrib/linkchecker/src/LinkCheckerLinkAccessControlHandler.php(58): Drupal\linkchecker\LinkCheckerLinkAccessControlHandler->checkParentEntityAccess()
#5 .../web/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php(343): Drupal\linkchecker\LinkCheckerLinkAccessControlHandler->checkFieldAccess()
#6 .../web/core/lib/Drupal/Core/Field/FieldItemList.php(154): Drupal\Core\Entity\EntityAccessControlHandler->fieldAccess()
#7 .../web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(256): Drupal\Core\Field\FieldItemList->access()
#8 .../web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(282): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple()
#9 .../web/core/modules/views/src/Entity/Render/EntityFieldRenderer.php(257): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple()
#10 .../web/core/modules/views/src/Entity/Render/EntityFieldRenderer.php(143): Drupal\views\Entity\Render\EntityFieldRenderer->buildFields()
#11 .../web/core/modules/views/src/Plugin/views/field/EntityField.php(873): Drupal\views\Entity\Render\EntityFieldRenderer->render()
#12 .../web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1195): Drupal\views\Plugin\views\field\EntityField->getItems()
#13 .../web/core/modules/views/views.theme.inc(238): Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender()
#14 [internal function]: template_preprocess_views_view_field()
#15 .../web/core/lib/Drupal/Core/Theme/ThemeManager.php(261): call_user_func_array()
#16 .../web/core/lib/Drupal/Core/Render/Renderer.php(490): Drupal\Core\Theme\ThemeManager->render()
#17 .../web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#18 .../web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1796): Drupal\Core\Render\Renderer->render()
#19 .../web/core/modules/views/src/Plugin/views/style/StylePluginBase.php(769): Drupal\views\Plugin\views\field\FieldPluginBase->theme()
#20 [internal function]: Drupal\views\Plugin\views\style\StylePluginBase->elementPreRenderRow()
#21 .../web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array()
#22 .../web/core/lib/Drupal/Core/Render/Renderer.php(886): Drupal\Core\Render\Renderer->doTrustedCallback()
#23 .../web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Render\Renderer->doCallback()
#24 .../web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#25 .../web/core/modules/views/src/Plugin/views/style/StylePluginBase.php(708): Drupal\Core\Render\Renderer->render()
#26 .../web/core/modules/views/src/Plugin/views/style/StylePluginBase.php(574): Drupal\views\Plugin\views\style\StylePluginBase->renderFields()
#27 .../web/core/modules/views/src/Plugin/views/style/StylePluginBase.php(462): Drupal\views\Plugin\views\style\StylePluginBase->renderGrouping()
#28 .../web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2177): Drupal\views\Plugin\views\style\StylePluginBase->render()
#29 .../web/core/modules/views/src/ViewExecutable.php(1600): Drupal\views\Plugin\views\display\DisplayPluginBase->render()
#30 .../web/core/modules/views/src/Plugin/views/display/Page.php(201): Drupal\views\ViewExecutable->render()
#31 .../web/core/modules/views/src/ViewExecutable.php(1697): Drupal\views\Plugin\views\display\Page->execute()
#32 .../web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay()
#33 [internal function]: Drupal\views\Element\View::preRenderViewElement()
#34 .../web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array()
#35 .../web/core/lib/Drupal/Core/Render/Renderer.php(886): Drupal\Core\Render\Renderer->doTrustedCallback()
#36 .../web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Render\Renderer->doCallback()
#37 .../web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#38 .../web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#39 .../web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#40 .../web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#41 .../web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#42 .../web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#43 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#44 .../web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#45 .../vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#46 .../vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#47 .../web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#48 .../web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#49 .../web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#50 .../web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#51 .../web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#52 .../web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#53 .../web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#54 .../web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#55 .../web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#56 .../web/index.php(19): Drupal\Core\DrupalKernel->handle()
#57 {main}

Steps to reproduce

The composer.json file removed the DER dependency. Maybe this is the cause of the issue?

Visit /admin/reports/linkchecker

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • Regression

    It restores functionality that was present in earlier versions.

Sign in to follow issues

Comments & Activities

  • Issue created by @solideogloria
  • I had to remove all link entities and reanalyze content for links. Then it works.

  • 🇺🇸United States jlancaster

    Similar issues. I quickly realized no content edits would save on site, producing a parent_entity_type_id not found error. I manually enabled dynamic entity reference after seeing it in missing modules report.
    composer require 'drupal/dynamic_entity_reference:^3.2'

    But the error remains for core broken links reports:

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    
  • @jlancaster, yes that's exactly what I had happen. Same errors. To fix it, delete all links and reanalyze content for links. I also upgraded to 2.1.x and removed dynamic_entity_reference

  • 🇺🇸United States jlancaster

    Ahh, you had me curious and confused because I had no idea what "delete all links and reanalyze content" meant (shows how often I use linkchecker). If anyone else sees this, I found what is being referenced at /admin/config/content/linkchecker in the "Maintenance" section the button says "Clear link data and analyze content for links." Once I ran this everything is good... minus waiting for content to reanalyze. That said, the missing dependency for DER is concerning and I'd like to manually not have to include it.

  • Yeah, 2.1.x doesn't use DER anymore, so I figured it was a good time to upgrade.

  • 🇺🇸United States paulmckibben Atlanta, GA

    Confirming the instructions in #5 from @jlancaster cleared the problem up for me. Thank you!

  • 🇺🇸United States adriancotter

    "Clear link data and analyze content for links" did not work for me. The view report is still throwing the same error. I don't see any obvious problems in the views configuration.

    The dynamic_entity_reference module is still enabled on my site. It is used by other modules, so it is not something I can remove.

  • Did you try uninstalling and reinstalling the Linkchecker module?

  • 🇺🇸United States adriancotter

    I really really wanted to avoid reinstalling the Linkchecker module -- having to set up all the fields again would be a super pain. (I guess I'd be able to reinstall field configs, but that would still be a bunch of time)

    Beyond having to delete all the old checked links, the view needed some updates as well. What I ended up doing was exporting the view from one my one simple site (where I did end up uninstalling and installing), and then (making sure I had the UUID correct) importing it into the other site.

  • The same bug bit me on D10.5.1 when upgrading 2.0.0 to 2.0.2
    After reading this thread, downgrading, upgrading and updating the db, clearing caches I did not to go to the report but called "Clear link data and analyze content for links". Maybe this error message provides some more information?

    Ein AJAX-HTTP-Fehler ist aufgetreten.
    HTTP-Rückgabe-Code: 500
    Im Folgenden finden Sie Debugging-Informationen.
    Pfad: /batch?id=211&op=do_nojs&op=do
    Statustext: error
    [message "unexpected error ..." in German]
    Drupal\Core\Entity\EntityStorageException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id__target_id' in 'NEW': INSERT INTO "linkchecker_link" ("status", "urlhash", "url", "method", "code", "error", "fail_count", "last_check", "entity_field", "entity_langcode", "uuid", "parent_entity_type_id", "parent_entity_id") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array
    (
    [:db_insert_placeholder_0] => 1
    [:db_insert_placeholder_1] => 9tazkp-ufKs0nSgxt3CsIxKNiazvXgYeERn5eLZN_Xw
    [:db_insert_placeholder_2] => https://mysite.tld/somepage-with-an-outdated-link-in-it
    [:db_insert_placeholder_3] => HEAD
    [:db_insert_placeholder_4] =>
    [:db_insert_placeholder_5] =>
    [:db_insert_placeholder_6] => 0
    [:db_insert_placeholder_7] =>
    [:db_insert_placeholder_8] => body
    [:db_insert_placeholder_9] => und
    [:db_insert_placeholder_10] => f8c0d5e4-0ac7-44c2-bf98-1097fd3b96e7
    [:db_insert_placeholder_11] => node
    [:db_insert_placeholder_12] => 3
    )
    in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). Drupal\Core\Database\StatementWrapperIterator->execute(Array, Array) (Line: 44)
    Drupal\mysql\Driver\Database\mysql\Insert->execute() (Line: 948)
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems(Object) (Line: 718)
    Drupal\Core\Entity\ContentEntityStorageBase->doSave(NULL, Object) (Line: 486)
    Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 806)
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 354)
    Drupal\Core\Entity\EntityBase->save() (Line: 383)
    Drupal\linkchecker\LinkExtractorService->saveLink(Object) (Line: 356)
    Drupal\linkchecker\LinkExtractorService->saveLinkMultiple(Array) (Line: 142)
    Drupal\linkchecker\LinkExtractorBatch->processEntities(50) (Line: 224)
    Drupal\linkchecker\LinkExtractorBatch->batchProcessEntities(50, Array) (Line: 297)
    _batch_process() (Line: 139)
    _batch_do() (Line: 95)
    _batch_page(Object) (Line: 52)
    Drupal\system\Controller\BatchController->batchPage(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 637)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 263)
    Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 219)
    Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • 🇺🇸United States nsciacca

    I had the same issue and I found it was the View config that was stored in the code that was the problem. The view itself needs to be updated, so if you copy it from the module's config directory, or uninstall the module, delete the existing Broken Links report view, then re-install the module and export the new config you should be good to go.

  • Thanks, @nsciacca. I am still struggling on D10.5.1 with linkchecker 2.0.2.

    Not sure what you meant by "delete the existing Broken Links report view" *after* unstalling the module. Running drush lccl (or the equivalent from the broken links page) works flawlessly on 2.0.0 but throws the errors on 2.0.2. Or did I misunderstand what you meant? Here is what I did this time:

    I completely uninstalled 2.0.0 that was working as expected. I cleared all caches, ran cron, newly installed with composer 2.0.2, upgraded the database (here is the update output from drush):

    > [notice] Update started: linkchecker_update_8003
    > [notice] Update completed: linkchecker_update_8003
    > [notice] Update started: linkchecker_update_8004
    > [notice] Entities are updating: finished 10 of 32.
    > [notice] Entities are updating: finished 20 of 32.
    > [notice] Entities are updating: finished 30 of 32.
    > [notice] Entities are updating: finished 32 of 32.
    > [notice] Update completed: linkchecker_update_8004
    > [notice] Update started: linkchecker_update_8005
    > [notice] Update completed: linkchecker_update_8005
    > [notice] Update started: linkchecker_update_8006
    > [notice] Linkchecker links are updating: finished 0 of 0.
    > [notice] Update completed: linkchecker_update_8006
    > [notice] Update started: linkchecker_update_8007
    > [notice] The entity_id field storage definition successfully uninstalled.
    > [notice] Update completed: linkchecker_update_8007
    > [notice] Batch process has consumed in excess of 60% of available memory. Starting new thread
    > [notice] Update started: linkchecker_post_update_remove_orphaned_queue_data
    > [notice] Update completed: linkchecker_post_update_remove_orphaned_queue_data
    [success] Finished performing updates.

    Cleared caches, and then running drush lccl throws again the same database errors as quoted in #12,

    drush lccl
    > [error] Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id__target_id' in 'NEW': INSERT INTO "linkchecker_link" ("status", "urlhash", "url",

    etc., as above, this time ending with

    > In StatementWrapperIterator.php line 113:
    >
    > SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id__target_id' in
    > 'NEW'
    >
    > In ProcessBase.php line 155:
    > Output is empty.

    Could it be that the database upgrade is slightly off for D10.5.* while working well for D11? Or am I overlooking sth. obvious?

Production build 0.71.5 2024