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 CiviCase (Moderator: Dave Greenberg) »
  • CiviCase: "required params missing" when creating new activities
Pages: [1]

Author Topic: CiviCase: "required params missing" when creating new activities  (Read 673 times)

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
CiviCase: "required params missing" when creating new activities
September 20, 2013, 07:24:45 am
Hi,

I'm running an instance of CiviCase with fairly large forms (http://forum.civicrm.org/index.php/topic,27697.0.html). My users have been having issues sometimes where saving an activity causes a fatal error: "required params missing". I'm not sure if it's something caused by custom development, large forms or browser issues (although most run the latest version of Firefox).

Looking at the backtrace, the error comes from: CRM/Case/Form/Activity.php in the "preProcess" function:

Code: [Select]
    if ( !$this->_caseId || (!$this->_activityId && !$this->_activityTypeId)) {
      CRM_Core_Error::fatal('required params missing.');
    }

From what I understood, these  values are fetched from either the $_REQUEST variable, and if not, from the session (?), i.e. using CRM_Utils_Requests::retrieve().

When the form is loaded, I have the following in the URL:
/civicrm/case/activity?action=add&reset=1&cid=3701&caseid=312&atype=54

In the form itself, the only hidden values stored a pretty much just the qfKey for the form, so I assume it's relying on the session?

Any hints as to what could explain the erratic, hard to reproduce bug?
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: CiviCase: "required params missing" when creating new activities
September 20, 2013, 08:59:41 am
My main lead is that most of the errors happened around a rebuild of the CiviCRM menu (/civicrm/menu/rebuild?reset=1) because code was pushed onto production and the menu had to be rebuilt.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: CiviCase: "required params missing" when creating new activities
September 22, 2013, 06:47:09 pm
Can you run a debugger, or put in some debugging code like CRM_Core_Error::debug() to see what those variable values are?

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: CiviCase: "required params missing" when creating new activities
October 15, 2013, 06:35:35 am
Sorry for the slow response, and thanks for responding.

In case anyone else runs into this problem: It was the menu rebuild (civicrm/menu/rebuild?reset=1) that was causing the sessions to be flushed, and it was causing the form to fail if it had been loaded on screen, and submitted after the rebuild. Usually I expected "cannot find qfKey" if it had been the case. The forms are pretty big, and staff takes some time to fill them in, so the error would occur sometimes up to 1h after the rebuild.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • CiviCase: "required params missing" when creating new activities

This forum was archived on 2017-11-26.