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?

Comments

Patricia_W’s picture

The 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.

hitfactory’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new900 bytes

And the patch for 7.x-1.x-dev

berdir’s picture

Status: Needs review » Needs work

I 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.

hitfactory’s picture

Yep. 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.