Error: Call to a member function getAlias() on null

Created on 28 August 2023, over 1 year ago
Updated 6 December 2023, 12 months ago

Hi,

I am getting the following error

Steps to reproduce,

1. Create new node without URL alias on Remote site
2. Proceed synchronisation on Client site
3. Update URL alias for the same node on Remote site
4. Proceed sync again on client site

entity_share module version is 8.x-3.0
Drupal version: 9.5.8

It throws the below error

Error: Call to a member function getAlias() on null in Drupal\path\Plugin\Field\FieldType\PathItem->postSave() (line 88 of /var/www/html/docroot/core/modules/path/src/Plugin/Field/FieldType/PathItem.php)
#0 /var/www/html/docroot/modules/contrib/pathauto/src/PathautoItem.php(34): Drupal\path\Plugin\Field\FieldType\PathItem->postSave(true)
#1 [internal function]: Drupal\pathauto\PathautoItem->postSave(true)
#2 /var/www/html/docroot/modules/contrib/pathauto/src/PathautoFieldItemList.php(24): call_user_func_array(Array, Array)
#3 /var/www/html/docroot/core/lib/Drupal/Core/Field/FieldItemList.php(198): Drupal\pathauto\PathautoFieldItemList->delegateMethod('postSave', true)
#4 [internal function]: Drupal\Core\Field\FieldItemList->postSave(true)
#5 /var/www/html/docroot/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(941): call_user_func_array(Array, Array)
#6 /var/www/html/docroot/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(973): Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('postSave', Object(Drupal\node\Entity\Node), true)
#7 /var/www/html/docroot/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(899): Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldPostSave(Object(Drupal\node\Entity\Node), true)
#8 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(598): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('update', Object(Drupal\node\Entity\Node))
#9 /var/www/html/docroot/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(784): Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\node\Entity\Node), true)
#10 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(523): Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object(Drupal\node\Entity\Node), true)
#11 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(804): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\node\Entity\Node))
#12 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\node\Entity\Node))
#13 /var/www/html/docroot/modules/contrib/entity_share/modules/entity_share_client/src/Plugin/EntityShareClient/Processor/EntityReference.php(181): Drupal\Core\Entity\EntityBase->save()
#14 /var/www/html/docroot/modules/contrib/entity_share/modules/entity_share_client/src/Service/ImportService.php(297): Drupal\entity_share_client\Plugin\EntityShareClient\Processor\EntityReference->processEntity(Object(Drupal\entity_share_client\RuntimeImportContext), Object(Drupal\node\Entity\Node), Array)
#15 /var/www/html/docroot/modules/contrib/entity_share/modules/entity_share_client/src/ImportBatchHelper.php(55): Drupal\entity_share_client\Service\ImportService->importEntityListData(Array)
#16 /var/www/html/docroot/core/includes/batch.inc(295): Drupal\entity_share_client\ImportBatchHelper::importUrlBatch(Object(Drupal\entity_share_client\ImportContext), 'https://miaxr-2...', Array)
#17 /var/www/html/docroot/core/includes/batch.inc(137): _batch_process()
#18 /var/www/html/docroot/core/includes/batch.inc(93): _batch_do()
#19 /var/www/html/docroot/core/modules/system/src/Controller/BatchController.php(55): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#20 [internal function]: Drupal\system\Controller\BatchController->batchPage(Object(Symfony\Component\HttpFoundation\Request))
#21 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#22 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#23 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#24 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#25 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#26 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#27 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/docroot/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/docroot/modules/contrib/shield/src/ShieldMiddleware.php(137): Drupal\shield\ShieldMiddleware->bypass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/docroot/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#39 {main}
🐛 Bug report
Status

Needs review

Version

3.0

Component

Entity Share Client

Created by

🇮🇳India anandhi karnan Chennai

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024