Store data in database rather than config

Created on 18 May 2023, over 2 years ago

Problem/Motivation

Whenever new content is added this module adds data in the thrid_party_settings of the content type. If the config is managed by a version control system then the config will need to be committed _every time new content is created_. I would argue that this data should be considered as content, rather than config, and stored in the database instead.

Steps to reproduce

  1. Create a new entity (node, taxonomy term, etc)
  2. Export config
  3. Note that the config has been changed to include data concerning the new entity

Proposed resolution

Create a custom database table
Store and access Entity Redirect data in this custom database table

Remaining tasks

User interface changes

N/A

API changes

TBC

Data model changes

TBC

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom jofitz Coventry

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

Comments & Activities

  • Issue created by @jofitz
  • Status changed to Postponed: needs info about 1 year ago
  • 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

    It should only be per content type not per content. What steps can replicate this? (I wasn't able to with the above steps)

  • Status changed to Active 3 months ago
  • 🇩🇪Germany luenemann Südbaden, Germany

    I suppose @jofitz is observing that third_party_settings are added to config even, when all options are disabled.

    Steps to reproduce are:

    • install entity_redirect
    • resave an existing node_type (don't change any settings)
    • export config
    • see that config of that node_type has changed (third_party_settings and dependency for entity_redirect are added)

    Problem with this is, that the changed node_type now depends on entity_redirect in config, even when it is not using the functionality of entity_redirect.

    I propose to use ThirdPartySettingsInterface::unsetThirdPartySetting() when all options are disabled/empty/default in entity_redirect_bundle_builder().

Production build 0.71.5 2024