Name of main property missing

Created on 26 February 2023, almost 2 years ago
Updated 28 February 2023, almost 2 years ago

Hi!

There seems to be some issues within the ECA framework not able to access properly datafield. it has been suggested 💬 Handling Multi-Value Nested Fields Closed: works as designed that the main property name is missing. I assume this also affects datafield. Doublefield has already addressed the issue.

Looks like this is a bug in the double_field module. Their field type defines 2 properties: first and second. But they don't define the name of the main property which results in value being used as the default. That said, Drupal now checks on the property value which doesn't exist and hence the ECA model has no access to write to that field.

The solution is simple: double field needs to implement the following method into their \Drupal\double_field\Plugin\Field\FieldType\DoubleField class:

  public static function mainPropertyName() {
    return 'first';
  }
Then it works just as expected.
💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇦🇹Austria coreteamvn

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

Comments & Activities

Production build 0.71.5 2024