Reviewed: https://reviews.mahara.org/3159 Committed: http://gitorious.org/mahara/mahara/commit/8c7a5e68b14a0cddd919f539babf060a31948820 Submitter: Son Nguyen (son.ngu...@catalyst.net.nz) Branch: 1.6_STABLE
commit 8c7a5e68b14a0cddd919f539babf060a31948820 Author: Ghada El-Zoghbi <gh...@catalyst-au.net> Date: Tue Nov 5 11:51:34 2013 +1100 Bug1075760: reporting objectional material with no message doesn't get sent to admin with digest emails Email digest table has a not null contraint for the message field: 1. Force the user to enter something in the objectionable comment. 2. Other areas: if a user enteres a message (i.e. in a forum) which is made up of html (i.e. a smiley face), the message gets 'cleaned' by stripping html tags. This leaves it empty and fails when trying to insert into the email digest table. Clean the message with html2text instead of str_shorten_html. 3. As a last resort, before inserting into the email digest table, make sure there is at least a space in the message field (if it's empty). Change-Id: I05a77e0682017839b34e74241eefb98fb788eab5 Signed-off-by: Ghada El-Zoghbi <gh...@catalyst-au.net> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1075760 Title: reporting objectional material with no message doesn't get sent to admin with digest emails Status in Mahara ePortfolio: Fix Committed Status in Mahara 1.6 series: In Progress Status in Mahara 1.7 series: In Progress Status in Mahara 1.8 series: Fix Released Status in Mahara 1.9 series: Fix Committed Bug description: This results in an email sent to all admins saying that the notification failed. The admin with digest on will not receive the empty message, but those without digest will. Reason is because it tries to store the data in a temporary table to digest them all. A couple of solutions: - take off the non null constraint on the temporary table (will fix similar issues if any) - set the message to be required (won't fix similar issues if any) If we do the second option, we should have a hunt around other notification types to see if they can have null message and fix them as well Subject: User notification error was probably caused by your server configuration. exception 'SQLException' with message 'Failed to get a recordset: postgres7 error: [-1: ERROR: null value in column "message" violates not-null constraint] in adodb_throw(INSERT INTO "notification_emaildigest_queue" ("type", "usr", "ctime", "url") VALUES (?, ?, ?, ?), Array) Command was: INSERT INTO "notification_emaildigest_queue" ("type", "usr", "ctime", "url") VALUES (?, ?, ?, ?) and values was (7,2,2012-10-23 15:41:44,view/artefact.php?artefact=1458781&view=219885)' in /var/www/lib/dml.php:1060 Stack trace: #0 /var/www/notification/emaildigest/lib.php(44): insert_record('notification_em...', Object(stdClass)) #1 [internal function]: PluginNotificationEmaildigest::notify_user(Object(stdClass), Object(stdClass)) #2 /var/www/lib/mahara.php(1359): call_user_func_array(Array, Array) #3 /var/www/lib/activity.php(468): call_static_method('PluginNotificat...', 'notify_user', Object(stdClass), Object(stdClass)) #4 /var/www/lib/activity.php(507): ActivityType->notify_user(Object(stdClass)) #5 /var/www/lib/activity.php(82): ActivityType->notify_users() #6 /var/www/lib/activity.php(219): handle_activity('7', Object(stdClass), true) #7 /var/www/lib/cron.php(158): activity_process_queue() #8 {main} To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1075760/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp