Applies the 4994 MR changes to the drupal 10.0.x.
Closes #2940605
Merge request reports
Activity
606 // If entity is new and has no ID, generate unique ID from entity object. 607 // This is to prevent false positives, for example when previewing a new 608 // node that is referencing a new node without either node yet being saved. 609 if ($entity->id()) { 610 $entity_id = $entity->id(); 611 } 612 else { 613 $entity_id = spl_object_id($entity); 614 } 615 // It seems very unlikely that the same entity displayed in the same view 616 // mode would be recursively nested and meant to be displayed differently, 617 // so a key made up of the entity type ID, entity ID, and view mode should 618 // suffice for recursion detection 619 return $entity->getEntityTypeId() 620 . $entity_id 621 . $build['#view_mode']; Possible suggestion, so the logged message contains e.g:
media:123:default
, instead ofmedia123default
Please register or sign in to reply