Check for null parent_entity_type_id src/Entity/LinkCheckerLink.php

Created on 6 May 2025, 2 months ago

Problem/Motivation

Needing this

Steps to reproduce

Unsure

Proposed resolution

See MR

Remaining tasks

Review

User interface changes

N/A

API changes

Minor

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada joseph.olstad

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

Merge Requests

Comments & Activities

  • Issue created by @joseph.olstad
  • Pipeline finished with Success
    2 months ago
    Total: 313s
    #489709
  • 🇳🇴Norway eiriksm Norway

    This code makes sense and all, but seems strange how you would find yourself in such a situation.

    Would at least need steps to reproduce, and ideally a test as well

  • 🇨🇦Canada joseph.olstad

    Possibly due to the use of the filebrowser module.

  • 🇦🇺Australia ar_howard

    I am also seeing a similar issue during cron runs:

    TypeError: Drupal\linkchecker\Plugin\LinkStatusHandlerBase::handle(): Argument #1 ($link) must be of type Drupal\linkchecker\LinkCheckerLinkInterface, null given, called in /home/kartbook/public_html/kartbook.au/modules/contrib/linkchecker/src/Plugin/QueueWorker/LinkStatusHandle.php on line 79 in Drupal\linkchecker\Plugin\LinkStatusHandlerBase->handle() (line 107 of /modules/contrib/linkchecker/src/Plugin/LinkStatusHandlerBase.php).

    #0 <fileloc>/modules/contrib/linkchecker/src/Plugin/QueueWorker/LinkStatusHandle.php(79): Drupal\linkchecker\Plugin\LinkStatusHandlerBase->handle()
    #1 <fileloc>/core/lib/Drupal/Core/Cron.php(270): Drupal\linkchecker\Plugin\QueueWorker\LinkStatusHandle->processItem()
    #2 <fileloc>/core/lib/Drupal/Core/Cron.php(235): Drupal\Core\Cron->processQueue()
    #3 <fileloc>/core/lib/Drupal/Core/Cron.php(162): Drupal\Core\Cron->processQueues()
    #4 <fileloc>/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
    #5 <fileloc>/core/modules/system/src/CronController.php(38): Drupal\Core\ProxyClass\Cron->run()
    #6 [internal function]: Drupal\system\CronController->run()
    #7 <fileloc>/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #8 <fileloc>/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #9 <fileloc>/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #10 <fileloc>/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #11 <fileloc>/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #12 <fileloc>/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #13 <fileloc>/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
    #14 <fileloc>/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #15 <fileloc>/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #16 <fileloc>/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #17 <fileloc>/core/modules/page_cache/src/StackMiddleware/PageCache.php(201): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #18 <fileloc>/core/modules/page_cache/src/StackMiddleware/PageCache.php(138): Drupal\page_cache\StackMiddleware\PageCache->fetch()
    #19 <fileloc>/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->lookup()
    #20 <fileloc>/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #21 <fileloc>/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #22 <fileloc>/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #23 <fileloc>/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #24 <fileloc>/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #25 <fileloc>/index.php(19): Drupal\Core\DrupalKernel->handle()
    #26 {main}
    
  • 🇨🇦Canada joseph.olstad

    Blame PHP 8.2+ for this in combination with contrib.

  • 🇳🇴Norway eiriksm Norway

    Still needs steps to reproduce and tests ✌️

Production build 0.71.5 2024