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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error viewing Activity
Pages: [1]

Author Topic: Error viewing Activity  (Read 1494 times)

barrylb

  • I’m new here
  • *
  • Posts: 19
  • Karma: 3
Error viewing Activity
July 07, 2008, 07:25:31 pm
I am working with my newly upgraded 2.04 system and when trying to view existing activities I get an error:

Sorry. A non-recoverable error has occurred.

is not of the type Integer

Return to home page.


Then when I navigate to another I get several warning messages at the top of the page which I think are from that error:

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in (...)/CRM/Event/BAO/Participant.php on line 501.

I successfully added a new activity and I can view it without trouble but existing ones are returning that error. Also, new activities have View/Edit/Delete links against them but existing ones only have View.

Any clues?

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Error viewing Activity
July 09, 2008, 07:48:51 am
I guess you have few NULL values for "source_record_id" in your 'civicrm_activity' table and activity link generation code is trying to find id from "source_record_id" resulting in error.

There was an attempt to fix this kind of problem (http://issues.civicrm.org/jira/browse/CRM-3085), but looks like some special case is still failing there.

A quick simple solution would be to run this query:
Code: [Select]
UPDATE civicrm_activity SET source_record_id=id WHERE source_record_id IS NULL;
which basically replaces NULL values with id field values.

And the reason you don't see Edit/Delete link for existing records is they must be related to contribution/event/membership .. which is an intended behavior.
« Last Edit: July 09, 2008, 08:53:15 pm by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

barrylb

  • I’m new here
  • *
  • Posts: 19
  • Karma: 3
Re: Error viewing Activity
July 15, 2008, 01:41:06 am
I found no nulls in the source_id field. I also found that the activities in question were of type id 5 (Event Registration).  However, I have no Events in the system which seems like something that could cause a problem.

I added a custom new activity type and manually updated the database rows to have this type, after which the activities showed with edit/delete links on CiviCRM Home. Another strange thing was that each activity was showing twice on CiviCRM Home.  I only had a small number so I deleted them and I will re-create them.  So no more problems now.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error viewing Activity

This forum was archived on 2017-11-26.