0

I have started experiencing some problems with non admin users, i get Fatal error on the logs when non admin users access civicrm example.com/civicrm and dashboard doesn't load for these users.

Admin users do not have this problem and dashboard loads correctly.

[info] $Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle )

[code] => 0
[message] =>
[mode] => 16
[debug_info] =>
[type] => PEAR_Error
[user_info] =>
[to_string] => [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]


[info] $backTrace = #0 ../sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 ../sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 ../sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("", 0, 16, (Array:2), NULL)
#4 ../sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("", 0)
#5 ../sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("ssl://www.excample.com", 443, NULL, NULL, NULL)
#6 ../sites/all/modules/civicrm/CRM/Utils/System.php(1393): HTTP_Request->sendRequest()
#7 ../sites/all/modules/civicrm/CRM/Core/BAO/Dashboard.php(326): CRM_Utils_System::getServerResponse("https://www.excample.com/civicrm/d$
#8 ../sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(5)
#9 [internal function](): CRM_Contact_Page_AJAX::dashboard()
#10 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#11 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
#12 ../sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))

)

I have taken a look at the following posts and seems to not solve my problem as this fatal error only comes from non admin users. SSL enabled CiviCRM with forever loading dashlets?,

The dashboard does not render

CiviCRM V4.6.10, Drupal 7, PHP 5.6.14-1

1

Based on this line:

#8 ../sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(5)

I can see that the error is to do with dashlet number 5. Since CiviCRM generally ships with 6 dashboards pre-built, that means that what I see as dashlet 5 in the database is the same as you. So I ran:

mysql> SELECT id, name, label, permission FROM civicrm_dashboard WHERE id = 5;
+----+----------+-----------+---------------------------------+
| id | name     | label     | permission                      |
+----+----------+-----------+---------------------------------+
|  5 | allCases | All Cases | access all cases and activities |
+----+----------+-----------+---------------------------------+

So my guess here is that you have this dashlet, but CiviCase may not be enabled.

Check your Drupal permissions to make sure your users have the "access all cases and activities" permission. If you're not using CiviCase, remove this dashlet from user's dashboards with this SQL command:

DELETE FROM civicrm_dashboard_contact WHERE dashboard_id = 5;

Also - if CiviCase is disabled, you may be able to temporarily enable it to modify the permissions appropriately.

  • thank you, will look into this solution, just a little bit confused because the fatal error comes just from certain users while others having the same roles have their dashboards loading correctly – Kboy May 10 '16 at 10:46
  • Just to add that Since civicase is not enabled, the permission is not also available, role has view all activities – Kboy May 10 '16 at 10:59
  • this command SELECT id, name, label, permission FROM civicrm_dashboard WHERE id = 5; gives me 5 | blog | CiviCRM News | access CiviCRM, and all users have the access CiviCRM permissions – Kboy May 10 '16 at 11:11
  • Even as an admin, when i follow the location url something like this: civicrm/ajax/dashboard?op=get_widget&key=...................&id=5, i get access denied but i do not get the fatal error – Kboy May 10 '16 at 13:07
1

This has now been resolved by disabling the CiviCRM news dashlet for the affected users. It seems the error message started when i disabled the community messages on the home dashboard in the civicrm settings file ($civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = false;) and started getting the fatal error from those users who had the dashlet enabled. Thank you @Jon for the hint, your sql statement helped me track down the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.