On the configuration page (admin/config/services/simplenews), the list of available newsletters is called using simplenews_newsletter_get_visible(). This is fine except if you create a newsletter with the 'Opt-in/out method' set to hidden, you get a drupal_set_message saying you have created a newsletter but can't see it in your list of newsletters. On top of this you don't know the id of that newsletter and need to do a database query just to find it in order to go to is edit page and change that setting.

Comments

yanniboi’s picture

Status: Active » Needs review
StatusFileSize
new684 bytes

I am still not that familiar with the 7.x-2.x api so I wasn't sure if a helper function already exists for 'all' newsletters so I used an entity_load() to fix this.

berdir’s picture

Yes, that is correct for now. The idea is that the whole page is going to be replaced with a view but until then, this is a correct fix.

yanniboi’s picture

Cool, thanks for the quick feedback!

berdir’s picture

Status: Needs review » Fixed

Thanks, commited.

Status: Fixed » Closed (fixed)

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