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 CiviContribute (Moderator: Donald Lobo) »
  • Undefined index: is_primary and is_recur (test drive of membership pay processor
Pages: [1]

Author Topic: Undefined index: is_primary and is_recur (test drive of membership pay processor  (Read 1134 times)

thomas

  • Guest
Undefined index: is_primary and is_recur (test drive of membership pay processor
January 24, 2010, 04:23:06 am
I want to create a web site where you pay to become a member. I have created a sign up page and use the pay pal pro processor and want to make a test run.

I get the following error messages when I make the contribution

Notice: Undefined index: is_primary in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\joomla15\administrator\components\com_civicrm\civicrm\CRM\Core\BAO\Block.php on line 252

Notice: Undefined index: is_recur in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\joomla15\administrator\components\com_civicrm\civicrm\CRM\Contribute\BAO\Contribution\Utils.php on line 164

Notice: Undefined index: is_recur in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\joomla15\administrator\components\com_civicrm\civicrm\CRM\Core\Payment\PayPalImpl.php on line 222

Has anybody got an idea where the problem might be or point me in the right direction to solve this problem?

Cheers,
Thomas

thomas

  • Guest
Re: Undefined index: is_primary and is_recur (test drive of membership pay processor
January 30, 2010, 06:48:04 pm
I have inserted CRM_Core_Error::debug at two places in the method “static function create( $blockName, &$params, $entity = null )” with the class CRM_Core_BAO_Block

When I try to make the contribution (sign up) then the following params are passed to method  create(

Array
(
    [contact_type] => Individual
    [contact_id] => 1
    [qfKey] => 7d920a880b81c1d8ba33e62bd227c44c
    [email] => Array
        (
            [1] => Array
                (
                    [location_type_id] => 5
                    [is_billing] => 1
                    [email] => hest@hest.dk
                )

        )

    [selectMembership] => 1
    [first_name] => hest
    [last_name] => hest
    [address] => Array
        (
            [2] => Array
                (
                    [location_type_id] => 1
                    [is_primary] => 1
                    [street_address] => fdfs
                    [city] => adf
                    [postal_code] => dsfsaf
                    [country_id] => 1228
                    [state_province_id] => 1020
                )

            [1] => Array
                (
                    [location_type_id] => 5
                    [is_billing] => 1
                    [billing_street_address] => adfadsf
                    [billing_city] => dsfdsfsa
                    [billing_state_province_id] => 1017
                    [billing_postal_code] => 23344
                    [billing_country_id] => 1228
                    [billing_state_province] => LA
                    [billing_country] => US
                )

        )

    [billing_first_name] => hest
    [billing_middle_name] =>
    [billing_last_name] => hest
    [credit_card_number] => xxxxxxxxxxxxxxx
    [cvv2] => xxx
    [credit_card_exp_date] => Array
        (
            [M] => 5
            [Y] => 2012
        )

    [credit_card_type] => Visa
    [MAX_FILE_SIZE] => 2097152
    [year] => 2012
    [month] => 5
    [ip_address] => 127.0.0.1
    [amount] => 100.00
    [amount_level] =>
    [currencyID] => USD
    [payment_action] => Sale
    [invoiceID] => 8f818dde7b60dc2471fc9ab981d4c587
    [is_pay_later] =>
    [description] => Online Contribution: Memberships
    [accountingCode] =>
    [is_deceased] =>
)

and then on line 256 where the error occurs the parameter value contains

Array
(
    [location_type_id] => 5
    [is_billing] => 1
    [email] => hest@hest.dk
    [id] => 5
)


and then I get the

Undefined index: is_primary in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\joomla15\administrator\components\com_civicrm\civicrm\CRM\Core\BAO\Block.php on line 256

Cheers,
Thomas

thomas

  • Guest
Re: Undefined index: is_primary and is_recur (test drive of membership pay processor
February 01, 2010, 03:27:49 pm
Ah this is very embarrassing. I have been so focused on the undefined index errors that I did not read the “real” error message.

After enabling curl in php it seems to be all good now (I get error messages from paypal).

I still have the undefined index errors but I can’t tell right now if they have anything to do with the paypal errors.   

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Undefined index: is_primary and is_recur (test drive of membership pay processor
February 01, 2010, 09:58:11 pm
you might want to apply this patch and check

go to CRM/Core/BAO/Block.php line around 252 onward

change this if condition
Code: [Select]
if ( $isPrimary && $value['is_primary'] ) {with
Code: [Select]
if ( $isPrimary && CRM_Utils_Array::value( 'is_primary', $value ) ) {
hope this help

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Undefined index: is_primary and is_recur (test drive of membership pay processor

This forum was archived on 2017-11-26.