notifications not working at all

LesleyHayes
LesleyHayes's picture

Joined: 2007-03-27
Posts: 21
Posted: Fri, 2013-02-08 11:44

I admit it - I was trying to change the notification email message (see other posts) but I soon gave up as it's a bit beyond me and not that important.
Any way I put the files back as they were and tested it and no emails came though on an item added nor a login failure or login/logout.
I un-installed and deleted the notification module and re-installed it and tested again and still nothing.
I have looked in the logs and there is:-
[Notice] Undefined index: url in file (removed for security...../)gallery.barlowtyrie.co.uk/images/smarty/templates_c/%%2775095255/matrix/%%E8^E87^E87E661E%%NotificationUserAdmin.tpl.php on line 76
so I cleared the caches.
Now I still don't any emails but nor do I get any errors on the screen or in the log.
I have tested the email set up and that sends me an email.
Bit stumped now....

Gallery URL = http://gallery.barlowtyrie.co.uk/main.php
Gallery version = 2.3.2 core 1.3.0.2
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.3.10-2 cgi-fcgi
Webserver = Apache/2.0.51 (Debian GNU/Linux) PHP/4.3.10-2 mod_ssl/2.0.51 OpenSSL/0.9.7e
Database = mysqlt 4.0.24_Debian-10sarge3-log, lock.system=flock
Toolkits = Exif, Gd, SquareThumb
Acceleration = none, none
Operating system = Linux chimp.keme.net 2.4.27-3-386 #1 Wed Dec 6 00:38:33 UTC 2006 i686
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17

 
LesleyHayes
LesleyHayes's picture

Joined: 2007-03-27
Posts: 21
Posted: Fri, 2013-02-08 15:11

just to add - the error is something to do with me adding notifications because another log entry popped out.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-02-08 16:42

I just tracked down the error in notification
edit line 708 in gallery2/modules/notification/classes/GalleryCoreEventNotifications.class
from:

return count($data) == 1 ?  $data[0]->getId() : $data[0]->getParentId();

to:

return $data[0]->getParentId();

this fixes the itemAdd notification, I'm not sure of the effect on any other notification types.
I cannot imagine wanting the itemId of the item that was just added, seems you would always want the patentId since that is the item you would be watching.

Also make sure you subscribe to the albums you want to watch by clicking the "watch" link in the sidebar for that album.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
LesleyHayes
LesleyHayes's picture

Joined: 2007-03-27
Posts: 21
Posted: Mon, 2013-02-11 09:57

thank you - that has certainly fixed the ItemAdd problem.
As with other topics I see on here it only notifies me when I login, logout or fail... I can live with that