I have some issues with sending newsletters after update to Drupal 8.4. It used to work fine on cron run but now it doesn't so I'm trying drush simplenews-spool-send. It doesn't work either.

simplenews.drush.inc

1. variable_get() is not in Drupal 8

$limit = variable_get('simplenews_throttle');

2. countMesages() (with single or double S) is undefined

bash-3.2$ grep -r countMesages *
simplenews.drush.inc:    $remaining = \Drupal::service('simplenews.spool_storage')->countMesages();

hardcoded $limit (should be \Drupal::config('simplenews.settings')->get('mail.throttle') I believe) and changing countMesages to countMails seems to solve the problem

I still have incorrect send status @ /admin/content/simplenews (0 of 1234 sent), the latter number decreases by 1 after cron run and it doesn't match what I see at node//simplenews. It's still 0 of XXXX there, but XXXX is correct and it decreases by 100 or whatever $limit is. But that's another story.

CommentFileSizeAuthor
#2 drush_fixes-2931645-12389415.patch936 bytesscoff

Comments

scoff created an issue. See original summary.

scoff’s picture

StatusFileSize
new936 bytes
adamps’s picture

Title: Is Drush support broken in 8.x? » Is Drush simplenews-spool-send command broken
Status: Active » Reviewed & tested by the community

Looks reasonable to me

  • Berdir committed 85ab697 on 8.x-1.x authored by scoff
    Issue #2931645 by scoff, AdamPS: Is Drush simplenews-spool-send command...
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Patch file was somehow broken but managed to apply it.

Status: Fixed » Closed (fixed)

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