Simplenews 6.x-2.x-dev from Feb 2
MimeMail 6.x-1.0-alpha7
Hi folks, probably something I'm missing somewhere, I'm just trying Simplenews out for the first time, apologies: Anyway, I set my 'Default newsletter options: Format' to html under 'Simplenews Settings'. I then create a new Newsletter under 'Content management > Newsletters management' and give it a name, leave all the defaults as is, and save.
Then I Create a new content 'Newsletter Issue' and choose my newly added Newsletter from the dropdown, add title, body and Save. Then I go to the Newsletter tab to send it, but under 'Email options' the 'Email format' is set to 'plain'..... Am I missing some other setting somewhere? I just thought if I set the master default to html then new newsletters would inherit that?
Apologies if I'm missing a concept or something simple. :)
JB
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | simplenews-settings_update_bug-1052050-9.patch | 1.74 KB | jsobiecki |
Comments
Comment #1
J.B-2 commentedI think this is a bug, changing category to suit...
Comment #2
J.B-2 commentedI've got a fix, which for me is at line 670 of the simplenews.module file, within the simplenews_nodeapi hook at the 'case insert' $op switch: replace the second
if (!isset($node->simplenews))with
if (empty($node->simplenews))...works for me.
Comment #3
simon georges commentedCommitted to CVS: http://drupal.org/cvs?commit=498858.
Thanks.
Comment #5
ambient.impactIs it possible that this bug (or a similar one) has made its way into 6.x-2.0-alpha2? I have the same problem as the original poster, but it appears to happen semi-randomly, and even occurs on newsletters I've already test-sent as HTML, which one assumes would have the setting saved.
Comment #6
loophole080 commented@ambient - maybe this: http://drupal.org/node/1132404 ?
Comment #7
ambient.impactThanks, but I had this problem before upgrading to Mime Mail 6.x-1.0-beta1, so it doesn't seem to be affected by that. Actually sending HTML properly doesn't seem affected, either before upgrading both modules, and after.
Comment #8
megachrizIn 6.x-2.0-alpha2 the advanced settings are cleared when updating the node. 's_format' will get empty in the table 'simplenews_newsletters'.
When inserting a node, $node->simplenews is this:
When updating a node, $node->simplenews is this:
The function simplenews_newsletter_update() expects the advanced settings to be in the 'advanced'-array, but this array doesn't exists when the node gets updated, resulting in an empty 's_format' value.
Comment #9
jsobiecki commentedHi,
I have prepared a patch, which should hopefully fix this issue. It basically reformats flat array to array with "advanced" sub array. Please review :)
Comment #10
miro_dietikerSubscribing
Duplicated by me with
#1210446: Newsletter by default plaintext, even if settings define html
Comment #11
serg.remote commentedPatch #9 works for me
Comment #12
OliverColeman commented#9 works for me, too. Thanks harijari.
Comment #13
simon georges commentedOk, it seems good. Before I commit it, shouldn't we call that on the node_load too, to have the same structure everywhere ?
Comment #14
jsobiecki commentedIf we change structure of simplenews array at node load, there will be more more changes required.
In fact, every place, where code access
simplenews[one of advanced properties]value, will be broken.Comment #15
miro_dietikerCurrently the system has a flattening function for exactly this case.
While for D7 i expect we should reimplement this completely, i strongly vote for an absolute minimum solution. Changing more will possibly break everything that is based on simplenews and does extend the module.
Tests needed...
Someone around to write tests about this topic?
Comment #16
simon georges commentedPatch in #9 committed on 6.x-2.x-dev for now. We really need to work on a test suite.
Comment #18
Thomassen commentedThis fix did not work for me: Still, the plain format is always selected.
Comment #19
lavamind commentedMake sure to use the latest development version (6.x-2.x-dev).
Unfortunately it's still broken in the latest stable version (6.x-2.0-alpha2).