Scheduled Reminders: with multi-lingual, the language filters are empty
To reproduce:
- Enable multi-lingual from Administer > Localization > Languages, the checkbox at the bottom of the screen
- Then go to Administer > Communications > Scheduled Reminders
- Add a new Reminder
Ignore everything, scroll down to the "Recipients language", and notice that the list is empty:
The regression was caused by: https://github.com/civicrm/civicrm-core/commit/de00a2b14f60a7f6fef59b5b3331c17fc1e3e061 - part of CiviCRM 5.66 (Symbiotic was on 5.65 and didn't see this until 5.70).
I don't know what's the best way of fixing it:
- The DAO correctly defines the callback for the
filter_contact_language
field - QuickForm uses
addField()
to add the field using metadata -
addField()
callsActionSchedule.getfields
, which fetches the metadata from the DAO -
civicrm_api3_generic_getfields()
has code like this:
if (function_exists($helper)) {
// alter
$helper($metadata, $apiRequest);
}
which basically calls _civicrm_api3_action_schedule_create_spec()
, and that then NULLs the callbacks, so the options are hidden in the UI.
@colemanw Any thoughts?
Bug found by @mmyriam