Call to a member function getClass() on null entity share module error

Created on 10 June 2022, over 2 years ago
Updated 17 February 2023, over 1 year ago

Error: Call to a member function getClass() on null in Drupal\jsonapi\Normalizer\FieldItemNormalizer->denormalize() (line 130 of /var/www/html/core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php)
#0 /var/www/html/vendor/symfony/serializer/Serializer.php(182): Drupal\jsonapi\Normalizer\FieldItemNormalizer->denormalize()
#1 /var/www/html/core/modules/jsonapi/src/Serializer/Serializer.php(75): Symfony\Component\Serializer\Serializer->denormalize()
#2 /var/www/html/core/modules/jsonapi/src/Normalizer/FieldNormalizer.php(65): Drupal\jsonapi\Serializer\Serializer->denormalize()
#3 /var/www/html/vendor/symfony/serializer/Serializer.php(182): Drupal\jsonapi\Normalizer\FieldNormalizer->denormalize()
#4 /var/www/html/core/modules/jsonapi/src/Serializer/Serializer.php(75): Symfony\Component\Serializer\Serializer->denormalize()
#5 /var/www/html/core/modules/jsonapi/src/Normalizer/ContentEntityDenormalizer.php(85): Drupal\jsonapi\Serializer\Serializer->denormalize()
#6 /var/www/html/core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php(99): Drupal\jsonapi\Normalizer\ContentEntityDenormalizer->prepareInput()
#7 /var/www/html/vendor/symfony/serializer/Serializer.php(182): Drupal\jsonapi\Normalizer\EntityDenormalizerBase->denormalize()
#8 /var/www/html/core/modules/jsonapi/src/Serializer/Serializer.php(75): Symfony\Component\Serializer\Serializer->denormalize()
#9 /var/www/html/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php(167): Drupal\jsonapi\Serializer\Serializer->denormalize()
#10 /var/www/html/modules/contrib/entity_share/modules/entity_share_client/src/Service/JsonapiHelper.php(287): Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer->denormalize()
#11 /var/www/html/modules/contrib/entity_share/modules/entity_share_client/src/Service/JsonapiHelper.php(467): Drupal\entity_share_client\Service\JsonapiHelper->extractEntity()
#12 /var/www/html/modules/contrib/entity_share/modules/entity_share_async/src/Plugin/QueueWorker/EntityShareAsyncWorker.php(144): Drupal\entity_share_client\Service\JsonapiHelper->importEntityListData()
#13 /var/www/html/core/lib/Drupal/Core/Cron.php(180): Drupal\entity_share_async\Plugin\QueueWorker\EntityShareAsyncWorker->processItem()
#14 /var/www/html/modules/contrib/ultimate_cron/src/UltimateCron.php(69): Drupal\Core\Cron->processQueues()
#15 /var/www/html/modules/contrib/ultimate_cron/src/ProxyClass/UltimateCron.php(70): Drupal\ultimate_cron\UltimateCron->run()
#16 /var/www/html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\ultimate_cron\ProxyClass\UltimateCron->run()
#17 [internal function]: Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate()
#18 /var/www/html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#19 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(88): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#20 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate()
#21 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(686): Stack\StackedHttpKernel->terminate()
#22 /var/www/html/index.php(27): Drupal\Core\DrupalKernel->terminate()
#23 {main}

Module:entity_share
Drupal:8.9

🐛 Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

🇮🇳India hazra.bhaskar

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Assigned to Grimreaper
  • Status changed to Active over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷
  • Issue was unassigned.
  • Status changed to Closed: cannot reproduce over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Hi,

    I have tested with:
    - a node with Metatag with and without values,
    - with and without the Metatag field enhancer enabled on the server website.

    Also, there seems to be a bug in JSON API Extras, you have to save a resource override twice to have configuration saved and do not forget to clear cache after applying the field enhancer.

    Everytime I have been able to import the entity, with or without the meatags depending if the field enhancer was enabled on the server website, but no fatal error.

    Like @gayatri chahar had written. This needs clear steps from a frest install to reproduce.

Production build 0.71.5 2024