- Issue created by @mlncn
- πΊπΈUnited States mlncn Minneapolis, MN, USA
Whether other modules providing fields should always implement getThurdPartySetting or not, from Field Encrypt's point of view if that is not there the field cannot be encrypted, so we can do this check and move on. That is, this protects people using Filed Encrypt from more than only Computed Field in its current state.
- π¬π§United Kingdom joachim
What does this module do for base fields, which don't support third party settings either?
- π¬π§United Kingdom joachim
This is an incorrect assumption:
$is_base_field = $storage->isBaseField(); // Check if the field is encrypted. if ( ($is_base_field && $storage->getSetting('field_encrypt.encrypt')) || (!$is_base_field && $storage->getThirdPartySetting('field_encrypt', 'encrypt', FALSE))
A field that is not a base field is not necessarily a config field. Bundle fields can be defined in code too.
Rather than doing
> method_exists($storage, 'getThirdPartySetting
in the MR, check for whether the field is a ConfigEntityInterface.
- First commit to issue fork.
- π―π΅Japan ptmkenny
I've updated the MR to check for ConfigEntityInterface instead of method_exists(), and I also checked the rest of the code for calls to getThirdPartySetting. I identified two more places where we need to check before calling the method.
Please test this new MR and confirm it works with computed_field.