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

Error when saving "Sendout Settings" without a selected contact #334

Closed
johnfmorton opened this issue Oct 13, 2022 · 4 comments
Closed

Error when saving "Sendout Settings" without a selected contact #334

johnfmorton opened this issue Oct 13, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@johnfmorton
Copy link

I'm on Craft CMS 4.2.3 and installed Campaign Pro just now.

In the initial setup process, I added email settings successfully and then moved to the "Sendout Settings" screen next. The only thing I tried to change on this screen was the "Memory Limit." I did not add a contact.

Hitting "Save" shows an error screen with the error:

Cannot assign string to property putyourlightson\campaign\models\SettingsModel::$defaultNotificationContactIds of type ?array

This happens on line 280 of putyourlightson/craft-campaign/src/controllers/SettingsController.php.

2022-10-13_17-08-15

@johnfmorton johnfmorton added the bug Something isn't working label Oct 13, 2022
@mattstein
Copy link

mattstein commented Oct 13, 2022

Why hello, @johnfmorton.

I can reproduce this with Craft 4.2.5.1 and Campaign Lite 2.1.9, specifically from CampaignSettingsSendout Settings saving while Default Notification Contacts is empty. (This doesn’t happen while saving Sendouts themselves, just that default setting.)

It looks like SettingsModel::$defaultNotificationContactIds is getting an empty string when it wants null or an array.

I’ll let Qualified People respond, and for now suggest that you simply Don’t Do That™.

@johnfmorton
Copy link
Author

Thank you. Yes, I can get around it. Just reporting and doing my civic duty.

@bencroker
Copy link
Collaborator

Thanks for reporting this, I'll be releasing a fix soon.

@bencroker
Copy link
Collaborator

Fixed in f8db9f1 and released in version 2.1.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants