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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush_fixes-2931645-12389415.patch | 936 bytes | scoff |
Comments
Comment #2
scoff commentedComment #3
adamps commentedLooks reasonable to me
Comment #5
berdirPatch file was somehow broken but managed to apply it.