Property value is unknown

Created on 29 August 2023, over 1 year ago
Updated 24 July 2024, 5 months ago

Problem/Motivation

Triggering a Drupal\civicrm_entity\Entity\CivicrmEntity::save() in code results in a
Drupal\Core\Entity\EntityStorageException: Property value is unknown error in some cases as the main property is not always correct for some reason.

Drupal\Core\TypedData\Plugin\DataType\Map->get('value') (Line: 208)
Drupal\civicrm_entity\Entity\CivicrmEntity->civicrmApiNormalize() (Line: 137)
Drupal\civicrm_entity\CiviEntityStorage->doSave('1', Object) (Line: 520)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 47)
Drupal\civicrm_entity\Entity\CivicrmEntity->save() (Line: 32)
Drupal\civicrm_integration\EventSubscriber\SyncCiviEvent->syncCiviCrmEvent(Object, 'hook_event_dispatcher.entity.presave', Object)

Steps to reproduce

  • Setup Drupal 9 site
  • Setup install CiviCRM & CiviCRM Entity
  • Install Metatag
  • Call Drupal\civicrm_entity\Entity\CivicrmEntity::save() method on an entity

Proposed resolution

Catch in case there is an error.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium yoerioptr

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

Comments & Activities

Production build 0.71.5 2024