← Back to team overview

mahara-contributors team mailing list archive

[Bug 1417828] Re: Malformed lang string in email digest notification emails

 

The problem here is the system only fetches the activity type info for
types not flagged as admin only.

The 'contact us' type as an admin only one.

Fast steps to test:

1) Insert into some data in emaildigest queue

INSERT INTO notification_emaildigest_queue VALUES(1,5,1,'2015-10-05 12:37:02','New contact test A');
INSERT INTO notification_emaildigest_queue VALUES(2,5,1,'2015-10-05 12:37:02','New contact test B');

2) Clear the cron nextrun and wait 1 minute:
UPDATE notification_cron SET nextrun = NULL;


** Also affects: mahara/16.04
   Importance: Undecided
       Status: New

** Changed in: mahara/16.04
       Status: New => In Progress

** Changed in: mahara/16.04
   Importance: Undecided => Medium

** Changed in: mahara/16.04
    Milestone: None => 16.04.0

-- 
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/1417828

Title:
  Malformed lang string in email digest notification emails

Status in Mahara:
  Confirmed
Status in Mahara 1.10 series:
  Confirmed
Status in Mahara 15.04 series:
  Confirmed
Status in Mahara 15.10 series:
  Confirmed
Status in Mahara 16.04 series:
  In Progress

Bug description:
  I noticed that when I get an email about a "Contact Us" via the email
  digest notification, It includes a missing lang string [[type/]].

  Because the email digest notification is a little unwieldy to test I
  haven't pinned down the exact replication steps yet, but I have been
  able to replicate the problem locally.

  The email generated looks like this:

  This is an auto-generated notification from Mahara. Following is the daily
  digest of all your notifications
  --------------------------------------------------
  Activity type: [[type/]] at 12 February 2015,  2:39 AM
  New contact us from sup <aaronw@xxxxxxxxxxxxxxx>: su
  sup
  To update your notification preferences, visit
  http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/account/activity/preferences/index.php
  Please do not reply to this message.

  There is also a warning stack in the email digest cron task:

  [INF] 15 (lib/cron.php:75) Running PluginNotificationEmaildigest::send_digest
  [WAR] 15 (notification/emaildigest/lib.php:83) Undefined offset: 5
  Call stack (most recent first):
    * log_message("Undefined offset: 5", 8, true, true, "/home/aaronw/www/mahara/htdocs/notification/emaild...", 83) at /home/aaronw/www/mahara/htdocs/lib/errors.php:439
    * error(8, "Undefined offset: 5", "/home/aaronw/www/mahara/htdocs/notification/emaild...", 83, array(size 7)) at /home/aaronw/www/mahara/htdocs/notification/emaildigest/lib.php:83
    * PluginNotificationEmaildigest::send_digest() at Unknown:0
    * call_user_func_array(array(size 2), array(size 0)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1579
    * call_static_method("PluginNotificationEmaildigest", "send_digest") at /home/aaronw/www/mahara/htdocs/lib/cron.php:80

  I haven't tested to see whether this problem is present in 1.9 & 1.8.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1417828/+subscriptions


References