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 CiviEvent (Moderator: Yashodha Chaku) »
  • Fatal error on live backend event registration
Pages: [1]

Author Topic: Fatal error on live backend event registration  (Read 1824 times)

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Fatal error on live backend event registration
February 04, 2010, 11:27:52 am
We finally went live with online ticket sales.  Despite what I thought was pretty thorough testing, I now have a critical problem.  When I try to register someone for an event from the backend, with CC processing, I get the following error when the form is submitted:

Fatal error: Unsupported operand types in /<baseurl>/sites/all/modules/civicrm/CRM/Price/BAO/Field.php on line 483

The line in question is:

$setectedAmounts[$textValue->id] = $priceFields[$fieldId]*$textValue->name;

Registering from the front end works fine.  Registering from the backend WITHOUT live CC processing works fine.  We've done a fair amount of customization, but this file has not been touched.  I thought maybe the line should read "$selectedAmounts"  instead of "$setectedAmounts", but I checked it against the SVN and it matched..

Can anyone help me figure out what's going wrong here?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal error on live backend event registration
February 04, 2010, 11:45:46 am

i would do a:

var_dump of the two variables:

$priceFields and $textValue

and see what they contain and what the code is trying to do

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 04, 2010, 11:51:13 am
Thanks.  I need a little more guidance on how to do a var_dump.

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 04, 2010, 12:07:50 pm
Ok.  Went online and read the manual.  Inserted the var_dump immediately before the line throwing the error.

This is the output:

array(1) { [15]=>  array(1) { [500]=>  string(1) "1" } } object(CRM_Core_DAO)#221 (14) { ["_DB_DataObject_version"]=>  string(6) "1.8.12" ["__table"]=>  NULL ["N"]=>  int(1) ["_database_dsn"]=>  string(0) "" ["_database_dsn_md5"]=>  string(32) "1ed9a33a18bb043dadb92ac699c4d673" ["_database"]=>  string(16) "catastrophic_crm" ["_query"]=>  bool(false) ["_DB_resultid"]=>  int(226) ["_resultFields"]=>  bool(false) ["_link_loaded"]=>  bool(false) ["_join"]=>  string(0) "" ["_lastError"]=>  bool(false) ["id"]=>  string(3) "500" ["name"]=>  string(2) "50" }

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal error on live backend event registration
February 04, 2010, 01:48:50 pm

can u also add the following:

CRM_Core_Error::debug( $fieldId, $priceFields );

and cut-n-paste the output. might be faster to interact on IRC

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 04, 2010, 01:53:54 pm
Here's the output (both var_dump & CRM_Core_Error::debug):

array(1) { [15]=>  array(1) { [500]=>  string(1) "1" } } object(CRM_Core_DAO)#221 (14) { ["_DB_DataObject_version"]=>  string(6) "1.8.12" ["__table"]=>  NULL ["N"]=>  int(1) ["_database_dsn"]=>  string(0) "" ["_database_dsn_md5"]=>  string(32) "1ed9a33a18bb043dadb92ac699c4d673" ["_database"]=>  string(16) "catastrophic_crm" ["_query"]=>  bool(false) ["_DB_resultid"]=>  int(226) ["_resultFields"]=>  bool(false) ["_link_loaded"]=>  bool(false) ["_join"]=>  string(0) "" ["_lastError"]=>  bool(false) ["id"]=>  string(3) "500" ["name"]=>  string(2) "50" }

15

Array
(
    [15] => Array
        (
            [500] => 1
        )

)

I can meet you on IRC now if you want.

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 04, 2010, 07:19:14 pm
(for posterity)

dlobo suggested via irc replacing problem line with:

$setectedAmounts[$textValue->id] = $priceFields[$fieldId][$textValue->id]*$textValue->name;

which worked for me.  Patch filed here: http://issues.civicrm.org/jira/browse/CRM-5780

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Fatal error on live backend event registration
February 08, 2010, 04:32:02 am
hi kmarkley,

I suspect given patch would break your normal offline event registration.
( offline registration without credit card )

actually main reason is wrong reference carrying and call to two different functions to perform same functionality.

so correct fix would be remove one call and deprecate wrong reference.

fix would be part of next stable release( CiviCRM v3.1.2 )

you might want to take a look for patch : http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/CRM/Event/Form/Participant.php?r1=26123&r2=26169

It would be great if you test this patch for offline registration with and without credit card functionality.

thanks

kiran
You Are Designed To Choose... Defined By Choice.

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 08, 2010, 07:05:22 am
Quote from: Kiran Jagtap on February 08, 2010, 04:32:02 am
I suspect given patch would break your normal offline event registration.

Actually, it appears to be working just fine.

Quote
It would be great if you test this patch for offline registration with and without credit card functionality.

Question:  This patch is on Event/Form/Participant.php, but the first one was on Price/BAO/Field.php.  Should I return CRM/Price/BAO/Field.php to its original state before applying the new patch?

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Fatal error on live backend event registration
February 08, 2010, 01:20:09 pm
Didn't have a lot of time to spend on it, but I ran 1 registration each with and without CC processing.  Both worked fine.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Fatal error on live backend event registration

This forum was archived on 2017-11-26.