Notice: Trying to get property of non-object in include() (line 64 of /home/kitchena/public_html/sites/all/modules/htmlmail/htmlmail--simplenews.tpl.php).

Notice: Undefined index: context in include() (line 64 of /home/kitchena/public_html/sites/all/modules/htmlmail/htmlmail--simplenews.tpl.php).

I am using Simple News Mail System and SMTP Authentication to get around normal email throttle limit imposed by ISP. Sort of annoying as it fills log but no noticeable effects otherwise.

CommentFileSizeAuthor
#6 1403924-5-simplenews-node.patch568 bytesfenstrat

Comments

berdir’s picture

Our API changed. See http://drupal.org/node/1390222

Mike Shand’s picture

pillarsdotnet’s picture

A patch would be welcome, but I'm probably going to move all the templates to an unreferenced /examples directory. Will revisit this issue at that time.

berdir’s picture

Basically, instead of $params['context']['node'] , you now need to call $params['simplenews_source']->getNode() , see the link above for more details.

pillarsdotnet’s picture

Assigned: Unassigned » pillarsdotnet
Status: Active » Needs work

Thanks; that helps a lot.

fenstrat’s picture

Status: Needs work » Needs review
StatusFileSize
new568 bytes

Attached implements #4 for those needing this fixed right now.

There's a lot of logic in this template, looks like it could be moved into a preprocess function?

fenstrat’s picture

Title: Getting following two notifications with every email sent » PHP notices when sending email with simplenews

.

bjlewis2’s picture

I haven't had a chance to test the patch, but I manually edited the file as suggested in #4 and it worked like a charm! Perfect!

geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

worksforme.

pillarsdotnet’s picture

Title: PHP notices when sending email with simplenews » Change simplenews template to use new simplenews API.
Status: Reviewed & tested by the community » Fixed

Pushed patch.

pillarsdotnet’s picture

Version: 7.x-2.62 » 7.x-2.63

Released 7.x-2.63.

fenstrat’s picture

Thanks @pillarsdotnet.

While the release notes have handy info for those updating, the latest one for 7.x-2.63 is missing the most important bit: what changed?

pillarsdotnet’s picture

Sorry; fixed.

I really need to move all the templates to an examples directory.

fenstrat’s picture

Thanks @pillarsdotnet.

Status: Fixed » Closed (fixed)

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