Creating new newsletter content (only needs a few words of plain text) and then requesting preview repeatably gives:-

•Notice: Trying to get property of non-object in simplenews_node_view() (line 355 of /content/Hosting/m/s/mshand.org.uk/subdomains/newsletter/web/sites/all/modules/simplenews/simplenews.module).
•Notice: Trying to get property of non-object in simplenews_node_view() (line 355 of /content/Hosting/m/s/mshand.org.uk/subdomains/newsletter/web/sites/all/modules/simplenews/simplenews.module).

Don't get any issues if you save rather than preview.
Nor is there any issue with editting an already created node and then requesting preview.

Repeated previews without saving give the error each time.

The problem seems benign, apart from generating the error message.

CommentFileSizeAuthor
#1 fix_preview_notices.patch1.41 KBberdir

Comments

berdir’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Confirmed, the attached patch fixes them and also adds tests for this.

berdir’s picture

Status: Needs review » Fixed

Commited and pushed.

Status: Fixed » Closed (fixed)

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