Whether I use views_embed_view() with the PHP filter, or the Insert View filter, when I create a new newsletter edition I get the views admin links included in the new edition body text.
This is obviously because I'm doing this as an admin user, but does that mean that if cron happens to be run as uid 1, users will receive a newsletter with (to them) junk HTML.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1352688.simplenews_scheduler.render-edition-nodes-anon.patch | 1.11 KB | joachim |
Comments
Comment #1
dgtlmoon commentedYou're not running cron.php from the web browser are you? that would be bad.
but either way, i think it should check for this
Comment #2
joachim commentedI'm currently testing new editions by running _simplenews_scheduler_new_edition() in the Exec PHP block... ;)
One fix might be to switch users to uid 0 within _simplenews_scheduler_new_edition() during the node body building process and switch back again.
Comment #3
joachim commentedHere's a patch that switches to the anon user to render the node.
Comment #4
joachim commentedFixed.