CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activities Dashlet error
Pages: [1]

Author Topic: Activities Dashlet error  (Read 2870 times)

vasike

  • Guest
Activities Dashlet error
February 04, 2010, 07:16:55 am
after the upgrade from 3 to 3.1

when i try to use the sorting for activities fields i got this error:

warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in drupal_path\sites\all\modules\civicrm\CRM\Activity\Selector\Activity.php on line 117.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities Dashlet error
February 04, 2010, 09:50:30 am
Based on the error, there are unexpected or missing values in your list of Activity Types. Have you added 'custom' activity types? If so, can you verify that each of them has a Value and a Label - and possibly try Edit -> Save for each of them (since I recall a problem a while back where the hidden 'name' column wasn't set properly). You'd do this from Administer >> Option Lists >> Activity Types.

If this doesn't solve things, please verify the screen / url where the error is happening - and ideally provide a dump of the following SQL query:

Code: [Select]
SELECT * from civicrm_option_value WHERE option_group_id IN (SELECT id from civicrm_option_group WHERE name = 'activity_type');
Protect your investment in CiviCRM by  becoming a Member!

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: Activities Dashlet error
February 07, 2010, 03:51:29 pm
Ugh... yeah this error is not limited to the dashlet area ... it is also when I go to add a new Activity directly under a person's contact record you get half a page of the error messages repeating

On the Activity Dashboard - when you click the Reset Dashboard Data button then the error goes away at the top...
Reset Dashboard Data button = https://yoursite/civicrm/dashboard?reset=1&resetCache=1

I've tried going through all the Activity Types and Edit/Save 'ing them, but it hasn't fixed up the problem.

I'll have a look in the database tables and see what is there (or not there as the case may be...)
« Last Edit: February 07, 2010, 04:20:46 pm by matth3wh »

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: Activities Dashlet error
February 07, 2010, 04:19:28 pm
Is this significant...?
There are NULL values for these entries in the name column:  Follow-up TO-DO Job Request and Database Review
Code: [Select]
mysql> SELECT * from civicrm_option_value WHERE option_group_id IN (SELECT id from civicrm_option_group WHERE name = 'activity_type');
+-----+-----------------+-----------------------------+-------+-----------------------------+----------+--------+------------+--------+---------------------------------------------------------------------+-------------+-------------+-----------+--------------+-----------+---------------+
| id  | option_group_id | label                       | value | name                        | grouping | filter | is_default | weight | description                                                         | is_optgroup | is_reserved | is_active | component_id | domain_id | visibility_id |
+-----+-----------------+-----------------------------+-------+-----------------------------+----------+--------+------------+--------+---------------------------------------------------------------------+-------------+-------------+-----------+--------------+-----------+---------------+
| 6   | 2               | Meeting                     | 1     | Meeting                     | NULL     | 0      | 0          | 2      | Meeting with person                                                 | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 7   | 2               | Phone Call                  | 2     | Phone Call                  | NULL     | 0      | 0          | 1      | Summary of phone call with person                                   | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 8   | 2               | Email                       | 3     | Email                       | NULL     | 0      | 0          | 3      | Summary of Email                                                    | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 9   | 2               | Text Message (SMS)          | 4     | SMS                         | NULL     | 0      | 0          | 4      | Text message SMS sent                                               | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 10  | 2               | Event Registration          | 5     | Event Registration          | NULL     | 0      | 0          | 5      | Online or offline event registration                                | 0           | 1           | 1         | 1            | NULL      | NULL          |
| 11  | 2               | Contribution                | 6     | Contribution                | NULL     | 0      | 0          | 6      | Online or offline contribution                                      | 0           | 1           | 1         | 2            | NULL      | NULL          |
| 12  | 2               | Membership Signup           | 7     | Membership Signup           | NULL     | 0      | 0          | 7      | Online or offline membership signup                                 | 0           | 1           | 1         | 3            | NULL      | NULL          |
| 13  | 2               | Membership Renewal          | 8     | Membership Renewal          | NULL     | 0      | 0          | 8      | Online or offline membership renewal                                | 0           | 1           | 1         | 3            | NULL      | NULL          |
| 14  | 2               | Tell a Friend               | 9     | Tell a Friend               | NULL     | 0      | 0          | 9      | Send information about a contribution campaign or event to a friend | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 293 | 2               | Follow-up                   | 10    | NULL                        | NULL     | 0      | 0          | 10     | Follow up after call or meeting                                     | 0           | 0           | 1         | NULL         | NULL      | NULL          |
| 294 | 2               | TO-DO                       | 11    | NULL                        | NULL     | 0      | 0          | 11     | Something for you or another person to do                           | 0           | 0           | 1         | NULL         | NULL      | NULL          |
| 295 | 2               | Job Request                 | 12    | NULL                        | NULL     | 0      | 0          | 12     | Ask someone to do a specific job for you                            | 0           | 0           | 1         | NULL         | NULL      | NULL          |
| 296 | 2               | Database Review             | 13    | NULL                        | NULL     | 0      | 0          | 13     | Find out whether this record is still valid and up to date          | 0           | 0           | 1         | NULL         | NULL      | NULL          |
| 365 | 2               | Pledge Acknowledgment       | 14    | Pledge Acknowledgment       | NULL     | 0      | 0          | 14     | Send Pledge Acknowledgment                                          | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 366 | 2               | Pledge Reminder             | 15    | Pledge Reminder             | NULL     | 0      | 0          | 15     | Send Pledge Reminder                                                | 0           | 1           | 1         | NULL         | NULL      | NULL          |
| 470 | 2               | Open Case                   | 16    | Open Case                   | NULL     | 0      | 0          | 17     | Start a new case                                                    | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 471 | 2               | Follow up                   | 18    | Follow up                   | NULL     | 0      | 0          | 19     | Followup on the case                                                | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 472 | 2               | Change Case Type            | 20    | Change Case Type            | NULL     | 0      | 0          | 21     | Change the case type                                                | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 473 | 2               | Change Case Status          | 22    | Change Case Status          | NULL     | 0      | 0          | 23     | Change of case status                                               | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 474 | 2               | Close Case                  | 24    | Close Case                  | NULL     | 0      | 0          | 25     | Close off this case with the contact person                         | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 492 | 2               | Membership Renewal Reminder | 25    | Membership Renewal Reminder | NULL     | 0      | 0          | 26     | Set an offline membership renewal reminder                          | 0           | 1           | 1         | 3            | NULL      | NULL          |
| 503 | 2               | Change Case Start Date      | 26    | Change Case Start Date      | NULL     | 0      | 0          | 27     | Change the start date of this case                                  | 0           | 1           | 1         | 7            | NULL      | NULL          |
| 528 | 2               | Bulk Email                  | 27    | Bulk Email                  | NULL     | 0      | 0          | 28     | Bulk Email Sent                                                     | 0           | 0           | 1         | NULL         | NULL      | NULL          |
| 529 | 2               | Assign Case Role            | 29    | Assign Case Role            | NULL     | 0      | 0          | 30     | Assign case role to worker                                          | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 530 | 2               | Remove Case Role            | 32    | Remove Case Role            | NULL     | 0      | 0          | 33     | Remove case role from worker                                        | 0           | 0           | 1         | 7            | NULL      | NULL          |
| 575 | 2               | Inbound Email               | 33    | Inbound Email               | NULL     | 0      | 0          | 34     | Inbound Email                                                       | 0           | 1           | 1         | NULL         | NULL      | NULL          |
+-----+-----------------+-----------------------------+-------+-----------------------------+----------+--------+------------+--------+---------------------------------------------------------------------+-------------+-------------+-----------+--------------+-----------+---------------+

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
advanced search page
February 07, 2010, 08:34:10 pm
I just went to the advanced search page and received the error literally about 60 times ..
.
warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /var/www/sites/all/modules/civicrm/CRM/Activity/Selector/Activity.php on line 117.

vasike

  • Guest
Re: Activities Dashlet error
February 08, 2010, 01:50:22 am
it seems that the NULL value is the problem.
but editing the Activity Type from CiviCRM doesn't solve the problem, the name field remain NULL
i had to edit it from DB and then it seems ok.
i think that is bug

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: Activities Dashlet error
February 08, 2010, 02:53:25 am
Thanks Dave and vasike... I'll fix up name column NULL values and confirm/deny fix  ;-)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities Dashlet error
February 08, 2010, 08:16:21 am
Quote from: vasike on February 08, 2010, 01:50:22 am
it seems that the NULL value is the problem.
but editing the Activity Type from CiviCRM doesn't solve the problem, the name field remain NULL
i had to edit it from DB and then it seems ok.
i think that is bug

1. I think there WAS a bug in a prior version where the name column wasn't auto-populated when a new activity type was created. I am not able to recreate this in 3.1.1 - but would be great if you could also confirm.

2. Saving an existing activity type w/ NULL 'name' column value SHOULD set a value (which also applies to modifying label in edit mode). If that is not happening, it's a bug - so please file an issue for this.
Protect your investment in CiviCRM by  becoming a Member!

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: Activities Dashlet error
February 10, 2010, 09:56:09 am
Can confirm this fixed by editing database by hand to remove [NULL] values...

I'll file a bug for this after I've had some sleep...

Andrew Perry

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 1
  • Building empowering tools that comply with rules
    • Community Builders Australia
  • CiviCRM version: 3.x, 4.x
  • CMS version: Joomla 1.0.x, 1.5.x -> Drupal 6.x, 7.x, WordPress
  • MySQL version: 5.1, 5.5, 5.6
  • PHP version: 5.2, 5.3, 5.4
Re: Activities Dashlet error
February 10, 2010, 10:53:16 pm
Thanks matth3wh, Dave and vasike

We have been having the same problem with a site that was originally 1.5!

I would say it is an issue with one of the versions between 1.5 and 3.1 (it was working fine at 1.9.X)
Community Builders Australia Pty Ltd
www.communitybuilders.com.au

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities Dashlet error
February 11, 2010, 05:34:18 pm
Re-saving the activity type indeed does NOT fix the NULL 'name' value. I've filed an issue for these anamolies to be fixed automatically in the upgrade script (so starting with 3.1.3 - folks upgrading from older versions with the problem will have it fixed). Meanwhile, if you hit this for your site, you'll need to manually fix the DB by copying civicrm_option_value.label to civicrm_option_value.name for activity types where .name is NULL.

http://issues.civicrm.org/jira/browse/CRM-5824
Protect your investment in CiviCRM by  becoming a Member!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Activities Dashlet error
March 11, 2010, 02:55:40 pm
Dave --
FYI I just ran into this error with case types. Looks like it can happen there as well.
-B

warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /xxxxxxx/CRM/Case/BAO/Case.php on line 452.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities Dashlet error
March 12, 2010, 05:32:18 pm
Thx Brian - reopened that issue to add fix when needed for case types.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activities Dashlet error

This forum was archived on 2017-11-26.