- Issue created by @mlncn
- Merge request !82Add check to ensure getThirdPartySetting method exists β (Merged) 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.
- Status changed to Needs review
21 days ago 11:16pm 24 July 2025 - First commit to issue fork.
- πΊπΈUnited States MegaKeegMan
Just rebasing to resolve merge conflict in #9
- π―π΅Japan ptmkenny
@megakeegman Thanks for rebasing. Have you encountered this error, and does the MR fix it for your site?
- πΊπΈUnited States MegaKeegMan
I can confirm that I have encountered the error and that the MR does fix it
-
ptmkenny β
committed ca0b8c43 on 4.x authored by
mlncn β
Issue #3517810 by ptmkenny, mlncn, megakeegman, joachim: Error when...
-
ptmkenny β
committed ca0b8c43 on 4.x authored by
mlncn β
- π―π΅Japan ptmkenny
Committed and will be in the next beta, thanks everyone!
Automatically closed - issue fixed for 2 weeks with no activity.