Active
Project:
Simplenews Scheduler
Version:
6.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2011 at 21:28 UTC
Updated:
28 Sep 2012 at 08:04 UTC
Reported at #1282504: How to create a base newsletter:
I found in function simplenews_scheduler_form_alter() a strange if statement (the first if):
if (isset($form['simplenews']) && user_access('send scheduled newsletters') && !isset($node->simplenews_scheduler_edition)) {
The isset($node->.... seems strange to me: nowhere a $node is defined up to this point in the code.
Maybe it should read: isset($form['.....
Comments
Comment #1
joachim commentedSince $node isn't set, an !isset() on it will always pass...
However, it looks like this is all a leftover from Simplenews 1.x, as when a node has been sent the incoming form is completely different and just shows the message 'This newsletter has been sent'.
Hence in this case we're adding a ton of cruft to the form that does nothing -- especially since it's not a form that can be submitted!
Downgrading to minor -- it's just code cruft. Though as we're probably still supporting simplenews 6.x-1.x, cleaning all this up would be non-trivial and would probably add complication.
Comment #2
joachim commentedFix reported over at #1581808: Cannot manually create new users with simplenews scheduler active:
Comment #3
joachim commented> Though as we're probably still supporting simplenews 6.x-1.x, cleaning all this up would be non-trivial and would probably add complication.
We're not supporting Simplenews 6-1 any more! This will thus be easier to fix.