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) »
  • Error with PayPal payment
Pages: 1 2 [3]

Author Topic: Error with PayPal payment  (Read 7723 times)

jcm55

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 14
Re: Error with PayPal payment
November 14, 2012, 11:31:22 pm
Also experiencing this after upgrade from 4.1.1 -> 4.2.6.


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: Error with PayPal payment
November 15, 2012, 06:39:52 am

hey jim:

we've not been able to replicate this and hence have not been able to debug and fix this.

would be great if u can debug and see what the issue is and why. if not, if u can give us access to your server we can take a look and figure out whats happening and why

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

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: Error with PayPal payment
December 14, 2012, 10:53:27 am

this issue has been fixed for 4.2.7 thanx to the efforts of jmeehan :)

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

DamonKirkpatrick

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • One job but so many responsibilities.
    • Friends of Georgia State Parks
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7.35
  • MySQL version: 5.1.48
  • PHP version: 5.3.8
Re: Error with PayPal payment
December 17, 2012, 10:17:50 am
The solution in #19 worked for me as well.  Is this the solution that was implemented for 4.2.7?  Is there something else that should be done instead of this?

Thanks.

jcm55

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 14
Re: Error with PayPal payment
December 17, 2012, 02:03:37 pm
Quote from: Stoic on December 17, 2012, 10:17:50 am
The solution in #19 worked for me as well.  Is this the solution that was implemented for 4.2.7?  Is there something else that should be done instead of this?

The fix that dlobo implemented is equally as simple, but preferable from a performance standpoint because it skips an even larger section of code than just the foreach loop.

You can see the diff for his fix here:

https://fisheye2.atlassian.com/viewrep/CiviCRM/branches/v4.2/CRM/Event/Form/Registration/Register.php?r1=42879&r2=44235

Brian.Sh

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7.1.9
  • MySQL version: 5.5.23
  • PHP version: 5.3.15
Re: Error with PayPal payment
January 25, 2013, 03:42:43 pm
Quote from: Donald Lobo on December 14, 2012, 10:53:27 am

this issue has been fixed for 4.2.7 thanx to the efforts of jmeehan :)

lobo

I'm new to CiviCRM this month and I am experiencing similar problems listed above (I think).  I get a couple error messages when using your contribution page as a registration/membership payment (listed below).  In addition to the errors, I get a redirect error page when using the "test-drive" feature that says "Could not find user name for payment processor".  I use PayPal Pro and I'm pretty confident that everything is set up as it should be.

Any advice would be appreciated.
-Brian

Notice: Undefined index: args in CRM_Core_Error::formatBacktrace() (line 601 of /home/yeeurch/public_html/sites/all/modules/civicrm/CRM/Core/Error.php).

Warning: Invalid argument supplied for foreach() in CRM_Core_Error::formatBacktrace() (line 601 of /home/yeeurch/public_html/sites/all/modules/civicrm/CRM/Core/Error.php).

Notice: Undefined index: auto_renew in CRM_Member_BAO_Membership::buildMembershipBlock() (line 756 of /home/yeeurch/public_html/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php).

dbadrak

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.4
Re: Error with PayPal payment
February 28, 2013, 08:42:48 pm
I ran into the line 756 auto_renew index issue, and it's not fixed in 4.2.8.  I did find this managed to make the errors go away though. I'm quite new to CiviCRM so I wasn't able to read the code and figure out exactly what's going on.

-- civicrm/CRM/Member/BAO/Membership.php.orig   2013-02-28 20:04:29.000000000 -0700
+++ civicrm/CRM/Member/BAO/Membership.php   2013-02-28 21:29:49.000000000 -0700
@@ -753,7 +753,8 @@
             }
 
             $javascriptMethod = array('onclick' => "return showHideAutoRenew( this.value );");
-            $autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = (int)$allowAutoRenewOpt * CRM_Utils_Array::value($value, $form->_membershipBlock['auto_renew']);;
+            $autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = (int)$allowAutoRenewOpt *
+               ( isset($form->_membershipBlock['auto_renew']) ? CRM_Utils_Array::value($value, $form->_membershipBlock['auto_renew']) : 0 );
 
             if ($allowAutoRenewOpt) {
               $allowAutoRenewMembership = TRUE;

I suspect the error is more around here 868-870, where $membershpBlock['auto_renew'] isn't being set at all.

   865      if ($dao->find(TRUE)) {
   866        CRM_Core_DAO::storeValues($dao, $membershipBlock);
   867        if (CRM_Utils_Array::value('membership_types', $membershipBlock)) {
   868          $membershipTypes = unserialize($membershipBlock['membership_types']);
   869          if (!is_array($membershipTypes)) {
   870            return $membershipBlock;
   871          }
   872          $memTypes = array();
   873          foreach ($membershipTypes as $key => $value) {
   874            $membershipBlock['auto_renew'][$key] = $value;
   875            $memTypes[$key] = $key;
   876          }
   877          $membershipBlock['membership_types'] = implode(',', $memTypes);
   878        }
   879      }


--
Don

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Error with PayPal payment
March 01, 2013, 03:33:06 am
I was able to re-produce auto_renew notice for v4.2. This has already been fixed in v4.3.

This seems to happen when "Member Signup and Renewal" page is configured to use a "Membership Price Set" instead of selecting types from "Membership Types" list.

Filed an issue here - http://issues.civicrm.org/jira/browse/CRM-11999.

Couldn't make a commit as we in the process of svn to git migration. Will check it in very soon.

Here is the patch anyway for your reference -

Code: [Select]
Index: CRM/Member/BAO/Membership.php
===================================================================
--- CRM/Member/BAO/Membership.php (revision 45945)
+++ CRM/Member/BAO/Membership.php (working copy)
@@ -753,7 +753,7 @@
             }
 
             $javascriptMethod = array('onclick' => "return showHideAutoRenew( this.value );");
-            $autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = (int)$allowAutoRenewOpt * CRM_Utils_Array::value($value, $form->_membershipBlock['auto_renew']);;
+            $autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = (int)$allowAutoRenewOpt * CRM_Utils_Array::value($value, CRM_Utils_Array::value('auto_renew', $form->_membershipBlock));
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: Error with PayPal payment
May 12, 2014, 11:38:13 am
FYI I get this same type of error when there are too many test contributions in the system--about 16 test contributions and #17 will give this error every time.  Deleting the previous test contributions solves the problem temporarily.

Code: [Select]
Invalid argument supplied for foreach() in /XXXXXX.XXXXXX/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php on line 268.

Pages: 1 2 [3]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error with PayPal payment

This forum was archived on 2017-11-26.