I'm trying to enable email notifications when users upload a picture to my site. Every time a notification email would be sent (e.g., the addition of a new item), I see the following in my log file:
2012-05-02 11:42:35 -07:00 --- error: @todo notification_event::batch_complete() failed
2012-05-02 11:42:35 -07:00 --- error: The body property does not exist in the Pending_notification_Model class
#0 /home/{my_user}/{my_site}/modules/notification/helpers/notification.php(177): ORM_Core->__get('body')
#1 /home/{my_user}/{my_site}/modules/notification/helpers/notification_event.php(95): notification::send_pending_notifications()
#2 /home/{my_user}/{my_site}/modules/gallery/helpers/module.php(400): notification_event_Core::batch_complete()
#3 /home/{my_user}/{my_site}/modules/gallery/helpers/batch.php(33): module_Core::event(Array, Array)
#4 /home/{my_user}/{my_site}/modules/gallery/controllers/uploader.php(116): batch_Core::stop('batch_complete')
#5 [internal function]: Uploader_Controller->finish()
#6 /home/{my_user}/{my_site}/system/core/Kohana.php(331): ReflectionMethod->invokeArgs()
#7 /home/{my_user}/{my_site}/system/core/Event.php(208): Kohana_Core::instance(Object(Uploader_Controller), Array)
#8 /home/{my_user}/{my_site}/application/Bootstrap.php(67): Event_Core::run(NULL)
#9 /home/{my_user}/{my_site}/index.php(102): require('/home/{my_user}...')
#10 {main}
So far I've tried running all the maintenance actions as the admin, and I've removed all the rows in the "pending_notifications" table. Neither solved the problem, although running the maintenance actions does cause the notification to be "sent" again (I say "sent" because it fails again).
Relevant version numbers/system info:
Gallery 3.0.3
PHP 5.2.17
Debian 5.0.9
Apache 2.2.17-1
Thanks for any information you can provide.
Posts: 25938
Does email work on your server? Test with the 'forgot your password?' link when trying to login.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 5
Apologies, that would certainly have been useful information. Yes, emails do work correctly on the server; I get an email when I use the "Forgot your password?" link.
Posts: 25938
just tested this module and it works for me.
Does the pending_notifications table exist in your DB?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 5
Yes. Here's the structure (copy/paste from phpMyAdmin, apologies for the formatting):
It currently has a single row (I moved the "text" column because of formatting issues with copy/paste):
Posts: 5
Any ideas?
Posts: 25938
just grasping at straws here....
edit /modules/notification/helpers/notification.php about line 177
->message($pending->body)to
->message($pending->text)Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 5
An excellent grasp, sir! That worked. Thank you very much!
Posts: 25938
Created ticket: https://sourceforge.net/apps/trac/gallery/ticket/1862
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 25938
Fixed:
https://github.com/gallery/gallery3/commit/ce209b9eaac301b8494d7d6faa72d013ed1c6cb9
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team