Drupal 7.69, Civi 5.23.0

A colleague just had an issue with CiviMail. She was trying to send a mail to Group "Volunteers" but exclude people in Group "Garden Volunteers". Instead of saying the number of recipients, it just froze on "Estimating..."

Civi estimating number of recipients

It still says estimating even if saving the draft and exiting.

When we try to submit the mailing, it gives a DB Syntax error.

I checked the Drupal error log and saw two relevant errors.

Pastebin link 1 | Link 2

I ended up fixing this by just creating a new mailing with the same settings and it worked fine, but would love to work out why the initial issue happened so I Can fix it pre-emptively in case it happens again in the future.

Flushing cache did not solve it.



EDIT It's happened again, looks like it's just an issue with one particular smart group. We've definitely mailed to this smart group in the past though.

Someone previously asked what I see when clicking on the spanner icon:

What I see when I click on the spanner

  • can you click on the wrench icon and share the screen shot? Commented Apr 28, 2020 at 10:23
  • @PradeepNayak someone deleted the draft mailing unfortunately after the duplicate successfully sent out. From memory, clicking it did nothing.
    – josh
    Commented May 1, 2020 at 0:20
  • It's happened again so I've shared a screenshot of what I see when clicking on the wrench icon
    – josh
    Commented Jun 15, 2020 at 5:13

1 Answer 1


The DB error looks to be caused by this clause: (civicrm_email.location_type_id != )

I don't know why that is occurring but check anything related to location types. Are you using flexmailer/Mosaico? Do you have any extensions installed that relate to mailing or email address locations?

  • Not using Mosaico (couldn't get it to work), Flexmailer is still enabled though. Only other mailing extension enabled is E-mail API (org.civicoop.emailapi)
    – josh
    Commented May 1, 2020 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.