A small patch that allows resending individual newsletters.

A textarea on the Newsletter tab will appear after a newsletter has been sent.
Simplenews resend

Add a comma delimited list of emails.

Comments

monstrfolk created an issue. See original summary.

monstrfolk’s picture

Issue summary: View changes
tfranz’s picture

Thank you – the patch worked as expected!!

But i had a small problem with Simplenews Scheduler after applying the patch. I got a PHP - Fatal error: "Unsupported operand types".

In simplenews_scheduler.module i had to change the following lines 82ff to get it to work:

      $form_state['simplenews_scheduler'] = $scheduler;

-      $form['simplenews']['send']['#options'] += array(
-        SIMPLENEWS_COMMAND_SEND_SCHEDULE => t('Send newsletter according to schedule'),
-        SIMPLENEWS_COMMAND_SEND_NONE => t("Stop newsletter schedule"),
-      );
+      array_merge($form['simplenews']['send']['#options'], array(
+       SIMPLENEWS_COMMAND_SEND_SCHEDULE => t('Send newsletter according to schedule'),
+       SIMPLENEWS_COMMAND_SEND_NONE => t("Stop newsletter schedule"),
+      ));
      $form['simplenews']['send']['#default_value'] = ($scheduler['activated'] == 1) ? SIMPLENEWS_COMMAND_SEND_SCHEDULE : variable_get('simplenews_send', SIMPLENEWS_COMMAND_SEND_NONE);
monstrfolk’s picture

can you please give more details on what you had to fix.

tfranz’s picture

StatusFileSize
new764 bytes

After applying your patch to simplenews 7.x-1.1 (with simplenews_scheduler 7.x-1.0-beta2) i received the following error visiting the page /node/[nid]/simplenews :

Fatal error: Unsupported operand types in /sites/all/modules/simplenews_scheduler/simplenews_scheduler.module on line 84

I needed to change line 84 in simplenews_scheduler.module to solve the error.

The problem seems to be the "array += array" in line 84. I simply changed it to "array_merge(array, array)".

Maybe $form['simplenews']['send']['#options'] isn't an array any more after your patch?

Attached is my patch for simplenews_scheduler.module.

Does this help you?