ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: badmonkey on July 07, 2017, 11:48:14 pm

Title: Notification templates?
Post by: badmonkey on July 07, 2017, 11:48:14 pm
1.1 RC1.  Notification emails do not contain text we humans would prefer.  They appear to be function names, such as likemsg. 

Not sure if this is a bug or there is something wrong in my setup.  If so, it's consistently wrong on all my elk sites.  ;D  Please advise accordingly!   ;)
Title: Re: Notification templates?
Post by: badmonkey on July 08, 2017, 12:08:02 am
This may be related:  forum error log also shows a message it cannot find the happy_birthday template.  Or something to that effect.
Title: Re: Notification templates?
Post by: emanuele on July 08, 2017, 03:32:31 pm
Can you check the error log and see if there is anything?
Thanks!
Title: Re: Notification templates?
Post by: badmonkey on July 08, 2017, 04:00:37 pm
Hi eman!  Hope you are well.  Nothing is reported in the forum error log, nor in php error logs. 

If it helps, notification subject and message body both appear as "likemsg", "quotedmem", etc. 
Title: Re: Notification templates?
Post by: emanuele on July 08, 2017, 04:38:19 pm
Try changing in sources/subs/ Notifications.class.php this:
Code: [Select]
		$this->register(2, 'email', array($this, '_send_email'), array('subject' => 'subject', 'body' => 'body'));
$this->register(3, 'email_daily', array($this, '_send_daily_email'), array('subject' => 'subject', 'body' => 'snippet'));
$this->register(4, 'email_weekly', array($this, '_send_weekly_email'), array('subject' => 'subject', 'body' => 'snippet'));
to:
Code: [Select]
		$this->register(2, 'email', array($this, '_send_email'), array('subject' => 'subject', 'body' => 'body', 'suffix' => true));
$this->register(3, 'email_daily', array($this, '_send_daily_email'), array('subject' => 'subject', 'body' => 'snippet', 'suffix' => true));
$this->register(4, 'email_weekly', array($this, '_send_weekly_email'), array('subject' => 'subject', 'body' => 'snippet', 'suffix' => true));
Title: Re: Notification templates?
Post by: badmonkey on July 09, 2017, 12:14:50 am
So far the Liked message is a confirmed fix.  Many thanks eman!  Hope you have a great day.   8)
Title: Re: Notification templates?
Post by: emanuele on July 14, 2017, 05:42:33 am
/me forgot to add this to the PR...

@Spuds maybe you have some space? O:-)
Title: Re: Notification templates?
Post by: Spuds on July 14, 2017, 07:54:38 am
I'll add it to the one I have open ...
Title: Re: Notification templates?
Post by: badmonkey on July 14, 2017, 01:28:43 pm
Many thanks for being responsive bugs squashers guys!
Title: Re: Notification templates?
Post by: ahrasis on May 15, 2018, 03:39:06 am
Sorry but I have this same error in 1.1.3, kind of.
Quote from: badmonkey – This may be related:  forum error log also shows a message it cannot find the happy_birthday template.
The exact error on mine is:
QuoteType of error: Template
The email template "happy_birthday" could not be found.
File: /var/www/clients/client2/web1/web/sources/subs/Mail.subs.php
Has it been fixed and added to 1.1.3? If not, don't forget to track it and add it to 1.1.4.
Title: Re: Notification templates?
Post by: emanuele on May 16, 2018, 01:02:43 am
Could you please open a bug report at github? And put both the report and the link here?
Title: Re: Notification templates?
Post by: ahrasis on May 19, 2018, 09:09:36 am
Sorry. I forgot to open a bug report. Will do it now, hopefully... :D