Prevent fields from being deleted if they are used in Experience Builder fields

Created on 6 June 2024, 12 months ago

Problem/Motivation

Follow-up to πŸ“Œ Prevent modules from being uninstalled if they provide field types used in an Experience Builder field Fixed

In that issue we had the test node

$this->createNode([
      'title' => 'Test node',
      'type' => 'article',
      'field_xb_test' => [
        'tree' => '[{"uuid":"dynamic-static-card2df","type":"sdc_test:my-cta"}]',
        // cspell:ignore centity dtitle elink furi fvalue
        'props' => '{"dynamic-static-card2df":{"text":{"sourceType":"dynamic","expression":"\u2139\ufe0e\u241centity:node:article\u241dtitle\u241e\u241fvalue"},"href":{"sourceType":"static:field_item:link","value":{"uri":"https:\/\/drupal.org","title":null,"options":[]},"expression":"β„ΉοΈŽlink␟uri"}}}',
      ],
    ]);

If we look at {"sourceType":"dynamic","expression":"\u2139\ufe0e\u241centity:node:article\u241dtitle\u241e\u241fvalue"},
In this case you can't delete the title field but if was a user created field in expression , say {"sourceType":"dynamic","expression":"\u2139\ufe0e\u241centity:node:article\u241dfield_something\u241e\u241fprop"}, then this would only make sense if field still existed

Steps to reproduce

Proposed resolution

Prevent fields from being deleted if they are used in Experience Builder fields

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Component

Data model

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

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

Comments & Activities

Production build 0.71.5 2024