Digest format assignment to simplenews node in simplenews_digest_inject_node() function looks like

$node->s_format = variable_get('simplenews_digest_format', 'plain');

but should be

$node->simplenews['s_format'] = variable_get('simplenews_digest_format', 'plain');

Taking into consideration rest of code this block

    $node->s_format = variable_get('simplenews_digest_format', 'plain');
    $node->priority = 0;
    $node->receipt = 0;
    $node->simplenews = array('send' => SIMPLENEWS_COMMAND_SEND_NOW); // Necessary to send out the newsletter without further user interaction.
 

should be

    $node->priority = 0;
    $node->receipt = 0;
    $node->simplenews = array(
      'send' => SIMPLENEWS_COMMAND_SEND_NOW,  // Necessary to send out the newsletter without further user interaction.
      's_format' => variable_get('simplenews_digest_format', 'plain')
    );
 

This code works for me perfectly.

CommentFileSizeAuthor
#1 simplenews_digest-806636.patch1.1 KBv.sidorov

Comments

v.sidorov’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Here is the patch. I've tested it.

v.sidorov’s picture

Status: Needs review » Active