only in patch2: unchanged: --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -5,6 +5,7 @@ * Install, update and uninstall functions for the node module. */ +use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\user\RoleInterface; @@ -218,3 +219,24 @@ function node_update_8003() { $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition($field_name, 'node')); } } + +/** + * Load all form displays for nodes, add status with these settings, save. + */ +function node_update_8004() { + $query = \Drupal::entityQuery('entity_form_display') + ->condition('targetEntityType', 'node'); + $ids = $query->execute(); + $form_displays = EntityFormDisplay::loadMultiple($ids); + + foreach ($form_displays as $nid => $node) { + // Assign status settings for the 'default' form mode. + $form_displays + ->setComponent('status', array( + 'type' => 'boolean_checkbox', + 'settings' => array( + 'display_label' => TRUE, + ))) + ->save(); + } +}