Forums | Mahara Community

Developers /
Warning error at module/multirecipientnotification/outbox.php


10 September 2016, 6:43 PM

Hi Folks,

I have found a warning error as bug at module/multirecipientnotification/outbox.php after compose the message.  Error details are 

My PHP version is 5.6.3 and Mahara version 16.04 

link /module/multirecipientnotification/outbox.php 

WAR] e9 (lib\mahara.php:1723) call_user_func_array() expects parameter 1 to be a valid callback, class 'ActivityTypeMultirecipientmessage' does not have a method 'default_notification_method'

Call stack (most recent first):

  • log_message("call_user_func_array() expects parameter 1 to be a...", 8, true, true, "D:\programs\xampp\htdocs\mahara1604\lib\mahara.php", 1723) atD:\programs\xampp\htdocs\mahara1604\lib\errors.php:513
  • error(2, "call_user_func_array() expects parameter 1 to be a...", "D:\programs\xampp\htdocs\mahara1604\lib\mahara.php", 1723, array(size 3)) at Unknown:0
  • call_user_func_array(array(size 2), array(size 0)) at D:\programs\xampp\htdocs\mahara1604\lib\mahara.php:1723
  • call_static_method("ActivityTypeMultirecipientmessage", "default_notification_method") atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\notification\ActivityTypeMultirecipientmessage.php:86
  • ActivityTypeMultirecipientmessage->notify_user(object(stdClass)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\notification\ActivityTypeMultirecipientmessage.php:66
  • ActivityTypeMultirecipientmessage->notify_users(array(size 2)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\lib\multirecipientnotification.php:120
  • send_user_message_mr(array(size 1), "test msg count2", "test msg count2", null) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\sendmessage.php:251
  • sendmessage_submit(object(Pieform), array(size 6)) at Unknown:0
  • call_user_func_array("sendmessage_submit", array(size 2)) atD:\programs\xampp\htdocs\mahara1604\lib\pieforms\pieform.php:540
  • Pieform->__construct(array(size 4)) at D:\programs\xampp\htdocs\mahara1604\lib\pieforms\pieform.php:161
  • Pieform::process(array(size 4)) at D:\programs\xampp\htdocs\mahara1604\lib\mahara.php:4561
  • pieform(array(size 4)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\sendmessage.php:238

Please guide us to sort out. Thank you!

Ghada El-Zoghbi's profile picture
Posts: 122

19 September 2016, 11:32 PM

Hi Akilan,

This sounds like a bug. Are you able to send any messages after you compose a message? 

I sent you a message from this site to test the compose. Did you get the message? 

I'll try it tomorrow on my dev machine to see if I get any errors. 

Thanks, 

Ghada 

 

20 September 2016, 12:32 AM

Hi Ghada,

Bug is NOT showing  the new message unread count at top right navigation.

I got message from you. And in my all testings recipient  receiving all emails at mahara inbox and same at personal inbox information about the message. But the count for unread is NOT working. Below i show the call stack .

Call stack (most recent first):

  • log_message("call_user_func_array() expects parameter 1 to be a...", 8, true, true, "D:\programs\xampp\htdocs\mahara1604\lib\mahara.php", 1723) atD:\programs\xampp\htdocs\mahara1604\lib\errors.php:513
  • error(2, "call_user_func_array() expects parameter 1 to be a...", "D:\programs\xampp\htdocs\mahara1604\lib\mahara.php", 1723, array(size 3)) at Unknown:0
  • call_user_func_array(array(size 2), array(size 0)) atD:\programs\xampp\htdocs\mahara1604\lib\mahara.php:1723
  • call_static_method("ActivityTypeMultirecipientmessage", "default_notification_method") atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\notification\ActivityTypeMultirecipientmessage.php:86
  • ActivityTypeMultirecipientmessage->notify_user(object(stdClass)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\notification\ActivityTypeMultirecipientmessage.php:66
  • ActivityTypeMultirecipientmessage->notify_users(array(size 2)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\lib\multirecipientnotification.php:120
  • send_user_message_mr(array(size 1), "test 4", "sadasdasdsadsa", null) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\sendmessage.php:251
  • sendmessage_submit(object(Pieform), array(size 6)) at Unknown:0
  • call_user_func_array("sendmessage_submit", array(size 2)) atD:\programs\xampp\htdocs\mahara1604\lib\pieforms\pieform.php:540
  • Pieform->__construct(array(size 4)) atD:\programs\xampp\htdocs\mahara1604\lib\pieforms\pieform.php:161
  • Pieform::process(array(size 4)) atD:\programs\xampp\htdocs\mahara1604\lib\mahara.php:4561
  • pieform(array(size 4)) atD:\programs\xampp\htdocs\mahara1604\module\multirecipientnotification\sendmessage.php:238

Thank you!

Ghada El-Zoghbi's profile picture
Posts: 122

20 September 2016, 11:34 AM

Hi Akilan,

I tested the message compose on my local development environment (for Mahara 16.04) and can't reproduce your error.

I tried it with both MySql and Postgres.

What I did find odd about your error:

* Pieform::process(array(size 4)) atD:\programs\xampp\htdocs\mahara1604\lib\mahara.php:4561

is supposed to be called on line 4511 (not 4561 as in your error).

Have you customised your Mahara?

 

Also, I think there's an issue with the user you are sending to. They don't have a default notification method set up.

Has this user you're trying to send to ever logged in?

Can you run these queries and let me know the results?

* select * from usr where usr = ?;

* select * from usr_activity_preference where usr = ?;

* select * from usr_account_preference where usr = ?;

Please replace '?' with the user's id.

Thanks,

Ghada

 

20 September 2016, 11:19 PM

Thank you for the troubleshooting Ghada. Table usr_activity_preference missed the records for the user accounts locally. We have re installed mahara and working perfectly now.  For testing purpose we have customized the lib/mahara.php. We extremely sorry for this type of bug reporting. We will be very cautious before reporting here in coming days. Thank you again for your great help.

Ghada El-Zoghbi's profile picture
Posts: 122

21 September 2016, 7:43 AM

Hi Akilan, 

You don't need to apologise. We're very happy to help. I'm glad we were able to resolve your issue. 

Cheers, 

Ghada 

Robert Lyon's profile picture
Posts: 444

22 September 2016, 9:47 AM

I note, by looking at the error posted earlier, that there is an issue in 16.04 branch of Mahara

 

The 'default_notification_method' function doesn't exist - so it is not callable by call_static_method() in ActivityTypeMultirecipientmessage.php

 

There was a fix for this https://reviews.mahara.org/#/c/6520/2 as part of a bigger patch in the upcoming 16.10 release.

I think it would be best to backport this fix to the other affected branches as well so I'll make a bug report/patch for that

https://bugs.launchpad.net/mahara/+bug/1626287

Cheers

Robert

 

7 results