Force to compute values in FieldInheritanceFactory::setValue()

Created on 2 March 2023, over 1 year ago
Updated 16 February 2024, 4 months ago

FieldInheritanceFactory class makes use of ComputedItemListTrait.

The trait mentioned above allows to set a custom field value instead of the computed one via the setValue() method.

This is not problematic for most of the cases, but I found an edge case for Field Inheritance where this can be problematic.

I'm inheriting a BaseField with the value coming form another entity. The issue comes from the fact that this base field is being initialized via setValue, so when I request it, the $valueComputed flag is already set to TRUE. then, this field appears as an empty string instead of the inherited value.

My proposal is to override the method mentioned above to force to compute the field even if we try ro set it via setValue() method.

It hould not be problematic. The trait follows this same approach for set() method.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain plopesc Valladolid

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024