Skip to content
Snippets Groups Projects
Commit ce215b17 authored by catch's avatar catch
Browse files

Issue #2841614 by hchonov, amateescu: comment_update_8300 is not updating...

Issue #2841614 by hchonov, amateescu: comment_update_8300 is not updating correctly the field storage definition of the status field
parent ba455a1d
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -189,8 +189,11 @@ function comment_update_8200() {
* Update status field.
*/
function comment_update_8300() {
$field_definitions = \Drupal::service('entity_field.manager')->getBaseFieldDefinitions('comment');
\Drupal::service('entity.definition_update_manager')->updateFieldStorageDefinition($field_definitions['status']);
$entity_definition_update_manager = \Drupal::service('entity.definition_update_manager');
$field_definition = $entity_definition_update_manager->getFieldStorageDefinition('status', 'comment');
$field_definition->setDescription(new TranslatableMarkup('A boolean indicating the published state.'))
->setRevisionable(TRUE);
$entity_definition_update_manager->updateFieldStorageDefinition($field_definition);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment