When working with the latest dev on Simplenews 7.x-2.x I get the following error when trying to bulk delete subscriptions on the admin/people/simplenews page.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'simplenews_subscription_delete_multiple' not found or invalid function name in simplenews_subscription_list_form_submit() (line 1166 of sites/all/modules/simplenews/includes/simplenews.admin.inc).
The delete operation is defined by simplenews_subscription_operations. A grep for 'simplenews_subscription_delete_multiple' in the simplenews directory doesn't give any results (apart from where its defined as a callback). Is there an alternative function?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | simplenews-subscription-delete-multiple-1885110-4.patch | 725 bytes | hitfactory |
| #2 | simplenews-subscription-delete-1885110-2.patch | 900 bytes | hitfactory |
Comments
Comment #1
Patricia_W commentedThe alternative function appears to be simplenews_subscription_delete (without the _multiple)
I changed the callbacks in simplenews.admin.inc and simplenews.api.php and the error went away and the subscriber was deleted.
Comment #2
hitfactory commentedAnd the patch for 7.x-1.x-dev
Comment #3
berdirI don't think that works, that function receives a $conditions argument, not an array of id's as the operations callback receives.
The delete_multiple() function should be created.
Comment #4
hitfactory commentedYep. Ignore that nonsense in #2!
I thought I was using the 1.x. branch but didn't realize drush dl simplenews --dev had grabbed 2.x.
Anyways, here's another patch for 2.x.