Created
July 18, 2024 20:17
-
-
Save junaidpv/370e3b1b8d5df1946bed672f65ddfb29 to your computer and use it in GitHub Desktop.
Custom patch to help with BWMA migraiton. Not to be used after the migraiton is over.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php | |
+++ b/src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php | |
@@ -279,7 +279,7 @@ | |
$is_affected = !$this->getFieldDefinition()->isTranslatable() || ($host instanceof TranslatableRevisionableInterface && $host->hasTranslationChanges()); | |
if ($is_affected && !$host->isNew() && $this->entity && $this->entity->getEntityType()->get('entity_revision_parent_id_field')) { | |
if ($host->isNewRevision()) { | |
- $this->entity->setNewRevision(); | |
+ $this->entity->setNewRevision(php_sapi_name() != 'cli'); | |
$needs_save = TRUE; | |
} | |
// Additionally ensure that the default revision state is kept in sync. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment