I set default value for nletter format to HTML but it keeps getting back to plain text when creating newsletter and i have to set it to HTML each time again.

I have also http://drupal.org/project/simplenews_content_selection installed, maybe this module breaks defaults?

Comments

Marko B’s picture

Tried it and it is true, when creating NL without this module above then HTML is fine, so seems that SCS module doesnt respect defaults. Please admin move this issue to that module.

simon georges’s picture

Project: Simplenews » Simplenews Content Selection

You can do it yourself by changing the "Project" field. Anyway, done.

Marko B’s picture

Didnt know i could, thanx.

Marko B’s picture

The part of function _scs_create_newsletter where simplenews nodes is saved doesn't save
$newsletter->simplenews['s_format'] = strtolower(variable_get('scs_format', 'plain'));

So there is no s_fomat variable later when the form is build in simplenews.module on line 403

 $form['simplenews']['advanced']['s_format'] = array(
        '#type' => 'select',
        '#title' => t('Email format'),
        '#default_value' => isset($simplenews_values['s_format']) ? $simplenews_values['s_format'] : variable_get('simplenews_format', 'plain'),
        '#options' => _simplenews_format_options(),
      );

That is why it is alyways plain text as default. Hope this is at least fixed in D7 version.

Anonymous’s picture

Issue summary: View changes

To solve this in function function _scs_create_newsletter I added this after node_save($newsletter);

$param_array['tid'] = 0; // We do not know the tid at that time
$param_array['s_status'] = 0; // send status is 0 at that time
$param_array['advanced']['s_format'] = $newsletter->simplenews['s_format'];
$param_array['advanced']['priority'] = $newsletter->priority;
$param_array['advanced']['receipt'] = $newsletter->receipt;
simplenews_newsletter_update($newsletter,$param_array);

vuil’s picture

Status: Active » Fixed

Close the issue as Fixed. Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.