Unable to send bulk mail from SearchKit search page results, 'send test' and 'next' buttons remain greyed-out
Overview
There appears to be an issue with inconsistent (or broken) use of required tokens feature between mailings sent from a core search versus from SearchKit results. As a result:
- When attempting to send from the results of a SearchKit search: the 'send test' and 'next' buttons remain greyed-out whether you do or do not include the required address and unsubscribe links
- This happens even when the option to not require these tokens is set in the system settings
- When attempting to send from the results of a regular search page it will allow you to send even if the tokens are set as required but not included in your message
Reproduction steps
- (issue 1) Create a custom search using search kit, select some results, choose action "Email - schedule/send via CiviMail", include all required elements and you'll see you're stuck
- (issue 2) go to Administer>CiviMail/CiviMail Component Settings and select "Disable check for mandatory tokens"; repeat step 1, same result
- (issue 3) Ensure mandatory tokens are enabled; use Search>Find Contacts, choose action "Email - schedule/send via CiviMail", do not include the tokens in your mailing and you'll see you can still proceed without getting an error (if you save the draft and then continue your draft it will work as expected)
Current behaviour
Unable to send mail from results of a SearchKit page; mail from a core search allows sending messages with missing tokens.
Environment information
- Browser: Chrome 119.0.6045.199
- CiviCRM: 5.66.2, 5.69.alpha1 (https://dmaster.demo.civicrm.org/)
- PHP: 8.1
- CMS: Drupal 7 (I believe I also tested on Drupal 10)
Comments
Workaround for issue 1 - if you save your draft and then clone your mailing, the clone works as expected