Skip to content
Snippets Groups Projects

Ensures entity has published key before setting status

Open Dieter Holvoet requested to merge issue/tmgmt-3516599:3516599-field-status-is into 8.x-1.x
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -615,7 +615,7 @@ class ContentEntitySource extends SourcePluginBase implements SourcePreviewInter
}
}
// Otherwise, try to set a published status.
elseif (isset($data['#published'][0]) && $translation instanceof EntityPublishedInterface) {
elseif (isset($data['#published'][0]) && $translation instanceof EntityPublishedInterface && $translation->getEntityType()->hasKey('published')) {
if ($data['#published'][0]) {
$translation->setPublished();
}
Loading