Create a update hook for sites that is currently using EBT Accordion to get the Title / Question and Text / Answer as required by default

Created on 11 March 2023, over 1 year ago
Updated 18 March 2023, over 1 year ago

Problem/Motivation

Recently we make an update at Title / Question as optional is allowing content editors create invalid accordions Fixed were we set the fields Title / Question and Text / Answer as required. It's because the acordion needs to have at least the title and the text to works fine. It was adjusted in the config object at yml file into config/install folder, but we need also create a hook_update to also set these as required for the sites that is currently is using the EBT accordion, since Drupal executes the config read in the config/install folder during the install process, and on this case the sites already it installed so this step is already done

Steps to reproduce

Proposed resolution

A solution for that is implements a hook_update_N, load the paragraph types -> Load the config field object -> verify if the field was loaded -> Set the required Method as true -> Save the config object

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