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 (Moderator: Dave Greenberg) »
  • CiviCase Mystery
Pages: [1]

Author Topic: CiviCase Mystery  (Read 6515 times)

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
CiviCase Mystery
July 02, 2009, 07:14:56 am
We are implementing a new install for CiviCase and have had a strange issue come up.

The install is a Drupal 6+CiviCRM 2.2.2 install running w/only CiviGrant+CiviCase enabled.

We have successfully setup our case types, activity types, timelines and xml files for the configuration setup as referenced in the http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCase+Configuration.

Everything is good when you enter data into the new custom fields for CiviCase and hit "Save". The issue is when you try to "Manage Case" and the new custom fields are empty, basically the custom field values are not being written to the DB.

Looking at the MySQL DB the custom field tables have been created correctly but there is no data in them.

We were unable to replicate in the current CiviCRM sandbox so we think it is in our server configuration.

Any suggestions or clues to what might be happening.

Thank you advance,

DS
Data-Scribe(r)
http://www.datascribe.biz

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Mystery
July 02, 2009, 10:04:56 am
A few questions:
Are the custom fields you are referencing in a custom field group which "extends" the Open Case activity type (rather than Activities -> any)?

Do you have custom field groups configured for any other activity types? If so, when you add or edit an activity of that type does the custom data get saved.

Can you check CiviCRM.log in your configured "Upload" directory to see if there are any relevant error messages.

If none of the above helps, then I think you'll need to add some debug statements in the code so see where it's failing. Probably best to get on IRC to discuss debug strategy.
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: CiviCase Mystery
July 06, 2009, 01:17:45 pm
Hi Dave,

Thanks for the suggestions.

Our log indicates the following error msg...
 
Jul 01 12:13:07  [info] $Fatal Error Details = Array
(
    [message] => Unable to load configuration file for the referenced case type: '' <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCase+Configuration"  target="_blank" title="Opens documentation in a new window.">(learn more...)</a>.
   
Code: [Select]
=>
)


Jul 01 12:13:07  [info] $backTrace = home/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 265
home/sites/all/modules/civicrm/CRM/Case/XMLProcessor/Process.php, fatal, 64
home/sites/all/modules/civicrm/CRM/Case/Form/CaseView.php, get, 119
home/sites/all/modules/civicrm/CRM/Core/Form.php, buildQuickForm, 324
home/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 98
home/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
home/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
home/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 245
home/sites/all/modules/civicrm/CRM/Case/Page/Tab.php, run, 101
home/sites/all/modules/civicrm/CRM/Case/Page/Tab.php, view, 171
home/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 205
home/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 339
, civicrm_invoke,
home/includes/menu.inc, call_user_func_array, 348
home/index.php, menu_execute_active_handler, 18

Jul 01 12:14:50  [info] $Fatal Error Details = Array
(
    [message] => Unable to load configuration file for the referenced case type: '' <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCase+Configuration"  target="_blank" title="Opens documentation in a new window.">(learn more...)</a>.
    [code] =>
)

Some addtional clues:
 1. We had setup the custom data groups for CiviCase activities awhile ago and didn't see any errors.
 2. The Array error msg (above) showed up when we stared to add custom data fields to the custom data groups for CiviCase.
 3. Some of our custom data groups and fields had special characters (hyphen's or parenthesis). We tried removing them but still had the same error appear.
 4. The built-in CiviCase fields data that you enter is saved as you would expect just our custom info is not.

We will be going over it again today to see if there is anything that we overlooked.   

Thanks for you assistance in advance.

-B



[/code]
Data-Scribe(r)
http://www.datascribe.biz

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Mystery
July 06, 2009, 04:14:32 pm
The log error indicates a mismatch between the value being passed in for case type and the name of the corresponding case configuration xml file.

--- from the doc -----
The file names should match the case type name with spaces removed and the first letter of each word upper-cased.
EXAMPLE: Case type = "Housing Support" Filename = "HousingSupport.xml"
-----

I don't understand why the custom field configurations would affect this - as it seems like a more general configuration issue. But I would check that first - and potentially add debug statements to the top 2 functions in the backtrace - CaseView::get and Process::retrieve
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: CiviCase Mystery
July 16, 2009, 01:07:44 pm
Hi Dave,

Thanks for the feedback.

We have double checked *.xml files and name conventions to ensue that they match up.

We are not 100% clear on where to insert the back trace variables you indicated. Can you indicate that 

CaseView::get and Process::retrieve

Is this something we can discuss through IRC?

Thank you,

DS
Data-Scribe(r)
http://www.datascribe.biz

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Mystery
July 17, 2009, 01:25:51 pm
The fatal error is being returned to CRM/Case/XMLProcessor/Process.php from CRM/Case/XMLProcessor.php retrieve() function. I would add a debug statement to figure out the filename it's NOT finding:

Something like this:

Code: [Select]
            // ensure that the file exists
            $fileName = implode( DIRECTORY_SEPARATOR,
                                 array( dirname( __FILE__ ),
                                        'xml',
                                        'configuration',
                                        "$caseType.xml" ) );

// add debug here
          CRM_Core_Error::debug('filename', $filename);
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: CiviCase Mystery
July 24, 2009, 10:21:18 am
Hi Dave,
Thanks for your help again. We tried creating a custom activity (for Core, not CiviCase) and created custom fields for it. It saved perfectly - no errors and it allowed us to go back and edit.

When we try to open a new case (with custom fields added) or add any other activities to an existing case, we get the following errors:

Code: [Select]
Warning: Invalid argument supplied for foreach() in .../CRM/Core/BAO/CustomField.php on line 451

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in .../CRM/Core/BAO/CustomField.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at .../CRM/Core/BAO/CustomField.php:1169) in .../CRM/Utils/System.php on line 323

We'll try adding the debug statements that you mentioned. What files should those be added to?

Thanks again!
Data-Scribe(r)
http://www.datascribe.biz

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Mystery
July 24, 2009, 11:28:44 am
First - please update your forum profile and confirm that you're working with the current stable version of CiviCRM (2.2.7) and Drupal (6.13).

I think debugging on the forum is getting a bit painful. So please package up everything we'd need to recreate your CiviCase configuration - the .xml configuration files, and a .sql file which will load your case types,  case-related activity types, and your case-related activity custom fields. Put these into a tarball / zip file and email a copy to yashodha dot chaku at webaccess dot co dot in (and cc to me - dave at civicrm dot org).  Hopefully we can figure out what's going wrong here.
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: CiviCase Mystery
July 31, 2009, 11:16:41 pm
Hi Dave,
Thanks for the offer. Since we're in the Web biz and work on sites of all flavors, we haven't updated our profile.  :)

We have success! We did a fresh install of Drupal 6.13 and CiviCRM 2.2.7 and got the custom fields to save. Yay!!! Then, we ran into another issue that we were able to resolve. Only some of the Activities we added to the XML file and configured in CiviCRM were showing up as available activities after opening a case.

To resolve it, we deleted the Activity and re-added it. Then, we had to redo the custom field groups since they were no longer connected to the Activity that was deleted.

It looks like the process to use in order to avoid this from happening again is:

1. Add activity names to case type xml file and upload the file.
2. Create the activity in CiviCRM.
3. Add the custom field group in CiviCRM and assign it to the activity.
4. Add the custom field data for that activity.
5. If you have more activities to add for that case type, repeat the process in order again.

Some other notes on things we changed for this round:
-We did not use any special characters in the activity names
-We did not use the "reuse options" feature for fields with multiple choice options

Things are looking good. Thanks again!
Data-Scribe(r)
http://www.datascribe.biz

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCase Mystery
August 01, 2009, 01:43:57 pm
Great news. Can you share a bit (maybe on a new post in the CiviCase board) about the client and how they are (or are planning) to use CiviCase?

Also, if you think your notes might be helpful to others than you could add them as comments on the Configuring CiviCase page here:

http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCase+Configuration
(linking to the 3.0 doc since that will be the stable doc version in the fall).
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: CiviCase Mystery
August 03, 2009, 03:14:11 pm
Done! http://forum.civicrm.org/index.php/topic,9150.0.html

I updated some of the CiviCase documentation and will continue to do so.

Thanks again!
Data-Scribe(r)
http://www.datascribe.biz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • CiviCase Mystery

This forum was archived on 2017-11-26.