Create a hook_update to set the timeline event as required by default

Created on 28 March 2023, over 1 year ago
Updated 29 March 2023, over 1 year ago

Problem/Motivation

Recently at 🐛 Fix the behaviour that EBT timeline is able to be created without any timeline event Fixed we updated the block type "EBT timeline" on to have the field timeline event as required by default, which makes sense. So now for the new users we're using the Block Type with the timeline event as required because on install Drupal will read the folder config/install where have this config updated. So now we need a task to create a hook_update to also make this update available for the existent users that is using the EBT timeline, since if the user already have it installed Drupal won't read the config/install folder

Steps to reproduce

Proposed resolution

  1. Implements hook_update_N
  2. Load the block entity
  3. Get the field timeline event
  4. Set it as required
  5. Save the config entity

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.4

Component

Code

Created by

🇧🇷Brazil renatog Campinas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024