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

(dev/mail#107) CiviMail - Fix validation error (5.49) #23141

Merged
merged 1 commit into from
Apr 10, 2022

Conversation

totten
Copy link
Member

@totten totten commented Apr 8, 2022

Overview

This fixes a new/inaccurate validation error in CiviMail.

ping @eileenmcnaughton

See also:

Steps to reproduce:

  • Disable Flexmailer
  • Use web UI
  • Create a new mailing
  • Fill out fields
  • Submit mailing

Before

The "Submit" action raises an error:

Mailing cannot be sent. There are missing or invalid fields (subject,name,from_name,from_email,body).

After

The "Submit" works.

Comments

The issue is that the validator is being called with a different data-structure (ie it was originally written for a Mailing DAO record - but now receives a partial Mailing array record). This patch is a side-port of the patch used on Flexmailer during 5.48 dev (7e0fcd9), and it allows the validator to accept either DAO or array.

Steps to reproduce:

- Disable Flexmailer
- Use web UI
- Create a new mailing
- Fill out fields
- Submit mailing
- Observe inaccurate error - Mailing cannot be sent. There are missing or invalid fields (subject,name,from_name,from_email,body).

See also: https://civicrm.stackexchange.com/questions/41654/after-upgrade-to-civicrm-5-48-0-all-submissions-say-mailing-cannot-be-sent-th
@civibot
Copy link

civibot bot commented Apr 8, 2022

(Standard links)

@civibot civibot bot added the master label Apr 8, 2022
@totten totten changed the title CiviMail - Fix validation error (dev/mail#107) CiviMail - Fix validation error Apr 8, 2022
@totten totten changed the base branch from master to 5.49 April 9, 2022 21:42
@civibot civibot bot added 5.49 and removed master labels Apr 9, 2022
@totten totten changed the title (dev/mail#107) CiviMail - Fix validation error (dev/mail#107) CiviMail - Fix validation error (5.49) Apr 9, 2022
@eileenmcnaughton eileenmcnaughton merged commit 66a46bc into civicrm:5.49 Apr 10, 2022
@totten totten deleted the master-mailing-verify branch April 11, 2022 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants