2

after the most recent update, none of my clients can send via CiviMail if they start from a search result. the error in all cases is "You have selected an email Selection Method without specifying a Location Type. Please go back and change your recipient settings (using the wrench icon next to "Recipients")." but they are starting from search results, there is no wrench. I can't find anywhere to set the default type to "automatic" (which I now have to do each time in civimail for any contacts to show when selecting already existing groups) these sites are all on the most recent version of Drupal 7 and civi 5.40.2 any ideas?

to replicate: start from search. search for a set of contacts. select the contacts and then from the action menu select Email- schedule/send via CiviMail

you will get the error " Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. You have selected an email Selection Method without specifying a Location Type. Please go back and change your recipient settings (using the wrench icon next to "Recipients")."

enter image description here enter image description here

2
  • don't personally use that method much, can you replicate on dmaster.demo.civicrm.org ? or does that site not let you get to the point where the problem shows (i just tried and didn't see your error above)
    – petednz - fuzion
    Aug 19, 2021 at 20:28
  • I've only hit the issue on 5.40.2 , none of the Drupal 7 demos are running that version and I did find one client site where the error does not happen. the only thing these other sites share in common is that they all started way back on civi 4.3 (upgraded over the years to 5.40.2) maybe there's some ancient cruft in my way
    – ericG
    Aug 19, 2021 at 21:49

1 Answer 1

1

on the sites that are impacted by this, it sees an empty selection method as having value https://github.com/civicrm/civicrm-core/pull/20536#issuecomment-915643323

the solution that I'm using for now is changing

if ($email_selection_method !== 'automatic' && !$location_type_id)

to

if ($email_selection_method !== 'automatic' && is_numeric($location_type_id))

in line 401 of CRM/Mailing/BAO/Mailing.php

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.