Ensure that group type mappings have the correct data type

Created on 9 April 2025, 9 days ago

Problem/Motivation

Currently all field types can be mapped to the field mappings (e.g. hostnames, frontpage, 404 or 404 HTTP page). But only specific field types do work.
Also there should be appropriate getter methods for the mapped values. \Drupal\Core\Field\PluginSettingsBase::getSetting() returns a fixed type. A mixed type cannot be correctly foreseen and handled without errors.
There is the method \Drupal\sites_group\Plugin\Derivative\GroupSites::getDerivativeDefinitions() but due to naming, I am not sure, what this method is doing and if it has anything to do with this context even.

Proposed resolution

See below in relation to the scope.

User interface changes

Add a description about the data type to the mappable fields

API changes

Create a GroupTypeMapping service, which provides the correct field values for the mapped fields.

Data model changes

Validate the field type, before a field mapping is saved

📌 Task
Status

Active

Version

1.0

Component

User interface

Created by

🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

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

Comments & Activities

Production build 0.71.5 2024