I add this patch that fixes the problem.
I am having the same error and it is due to this change in version 1.17:
#3478739 by berdir: Create revision before changing values, set revision author and time
If I leave the creation of a revision as it was in 1.16, version 1.17 works fine.
Specifically, the problem is on line 507:
$translation = $storage->createRevision($translation, $translation->isDefaultRevision());
Leaving the previous line, the one that updated the $entity variable works:
$entity = $storage->createRevision($entity, $entity->isDefaultRevision());
Hi all,
I add a patch for version 10.3 and 11 because the one that is visible now only works for 10.2.
The final patch that fixes both problems. The reason is that gid cannot be null.
Hello again,
Sorry, I realized that my difference is due to the fact that I have the patch applied as well:
https://www.drupal.org/files/issues/2024-03-11/3427115-2.patch →
I don't know if the same thing can happen to anyone.
Hello,
I add a small change in the patch because the code of version 1.5 changes a little. Instead of:
'realm' => 'view_unpublished_author',
'gid' => $node->getOwnerId(),
I have:
'realm' => 'view_unpublished_author',
'gid' => $node->getOwnerId() ?? 1,
I've added a small change to make the patch work, although I'd like to have it reviewed in case anyone has a better solution.