Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReviewFrom value doesn't take into account email: displayname usage in configuration #202

Open
JamesDPC opened this issue Jun 27, 2023 · 2 comments

Comments

@JamesDPC
Copy link

Hi folks

If you have this configuration per the documentation:

SilverStripe\Control\Email\Email:
  admin_email:
    [email protected]: 'Support team'

The field in site settings will end up containing a JSONifed representation:

{ "[email protected]": "Support team" }

... and the content review notification job will fail due to email address validation.
Easy to workaround by updating the field value in site settings. Picking out the email address from the config setting would be a better option, by detecting an array value.

@GuySartorelli
Copy link
Member

Thanks for reporting this - can you please include what version(s) of this module this bug affects?

@NightJar
Copy link
Contributor

NightJar commented Jul 24, 2023

All of them.

image

Because the admin email config definition changed to support something this module isn't aware of.

https://github.com/silverstripe/developer-docs/blob/27bcf60f87849ff45ccfc2a2d5ae19e89bcdef43/en/02_Developer_Guides/10_Email/index.md?plain=1#L187

Probably no module is aware of this. Including the framework itself.
The Config "API" was updated to support a non-string at 4.4.5, but no getter was added to normalise this behaviour (at least not in the same commit - I didn't check further). The array setting is dealt with in a specific use case, and seemingly nowhere else.

silverstripe/silverstripe-framework@7db524b#diff-6c9d9301adeda8e2aa1c06db7e907f0d57ee1ba23fc43ff685eef9d225d0a9d2R55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants