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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?
Pages: [1]

Author Topic: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?  (Read 3223 times)

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?
August 06, 2008, 10:29:58 am
I am at the end of my process of upgrading to CiviCRM 2.0.5 under php5. I had been CiviCRM 1.8 under php4. During my QA testing I found what I thought was going to be a simple reset of a variable name, but have since found that it is a more involved problem(with a probable fix in 2.1) But since 2.1 is not quite ready for production, I am looking for a workaround that I can use on my 2.0.5 system.

From the comments I have seen (Links at bottom of post) it appears that the fix used in 2.1 involves multiple updates in multiple locations and is a bit to involved to easily to back-port to 2.0 So I am hoping that there will be a temporary work-around that won't be to bad.

From my reading it appears that the problem is with custom fields that are not of type Individual (or Contact). In my case they are attached to a contribution record and are used to allow a donor to designate which area/project they would like their donation directed to.

Code: [Select]
===========================================================
Credit or Debit Card Information
===========================================================
MasterCard
************0015
Expires: March 2016


===========================================================
Additional donation details
===========================================================
 custom_3 : Array
 custom_5 : Array

Since the other forum topics I found  don't seem to mention a fix or workaround, I was hoping that I had missed something.

Receipt missing custom data - http://forum.civicrm.org/index.php/topic,3840.msg16920.html
civicrm_activity_update with custom data? - http://forum.civicrm.org/index.php/topic,4109.msg18102.html
« Last Edit: August 11, 2008, 03:54:07 pm by MacRonin »

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 07, 2008, 01:22:27 am
Can you check if the problem persists with any new custom fields/groups created in 2.0 ?
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 07, 2008, 08:51:33 am
I'm in a class at the moment, but I'll do a test this afternoon. I haven't made this version Live yet, so I can experiment some. Just gotta make another backup first. Remember ... always make a backup  ;-)

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 07, 2008, 09:24:13 pm
I added another field to the group that was generating a problem in the receipt and it did not come out correctly. What I added was a Yes/no field/
Code: [Select]
===========================================================
Additional donation details
===========================================================
 custom_3 : Array
 custom_5 : Array
 custom_7 : Array


BTW, while it may not be directly related to the problem I'm reporting, it is impacting the same custom field group. But this weird effect started prior to my update to 2.0. In  addition to the regular email receipt I am getting another email with just that custom field group. I'm guessing that there was a new parm that requested this that got added someplace in my upgrade path from v1.8php4

Previously though it did display the info correctly, Now In this extra email I get just the title but no data. Not even the " custom_3 : Array"
Code: [Select]
Additional donation details Submitted by Paul Hardwick

Submitted For: Paul Hardwick
Date: Sun, 03 Aug 2008 19:20:06 -0400
Contact Summary: https://www.Example.org/civicrm/contact/view?reset=1&cid=1

===========================================================
Additional donation details
===========================================================
 Donor wish : Sunflower Children Anywhere
 Other notes : Test transaction

It now says:
Code: [Select]
Additional donation details Submitted by Paul Hardwick
Submitted For: Paul Hardwick
Date: Fri, 08 Aug 2008 00:09:02 -0400
Contact Summary: https://www.Example.org/civicrm/contact/view?reset=1&cid=1

===========================================================
Additional donation details
===========================================================
« Last Edit: August 07, 2008, 09:26:28 pm by MacRonin »

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 07, 2008, 09:50:51 pm
OK to try a slightly cleaner environment I created a whole  new donation page and included the previous Custom Field Group and also created a new one. With the new donation page, both Custom Field Groups had the printing error
Code: [Select]
===========================================================
Additional donation details
===========================================================
 custom_3 : Array
 custom_5 : Array
 custom_7 : Array


===========================================================
test v20 custom ield
===========================================================
 custom_8 : Array

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 08, 2008, 12:12:33 am
Debugging might help in your case. Check "sendmail" method of CRM/Contribute/BAO/ContributionPage.php file line-88. And the template which sets the layout of the receipt is - templates/CRM/Contribute/Form/Contribution/ReceiptMessage.tpl file.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

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: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?
August 08, 2008, 01:33:48 am

Paul:

1. can we get ssh access to your site. might be easier for us to just jump on the site and help debug this. This was an issue in an earlier version of 2.0, and i think we fixed it. I dont remember and cant find the issue :(.

2. Can you get on IRC: http://embed.mibbit.com/?server=irc.freenode.net&channel=%23civicrm&forcePrompt=true. Hopefully one of the core devs will be around and we can take a look and figure out whats wrong etc

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

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 08, 2008, 06:17:06 am
Deepak I have turned debugging on and am browsing the source for both files that you mentioned. I'll also process another contribution, and see iff anything interesting shows up.

Lobo Yes SSH access could be arranged. And I am currently in the Chat room. Just to let you know. To access the site you will have to add en entry to your Hosts file for the domain name. This upgrade which brought me to 2.0.5 was part of a server switch. So the official DNS points to the original server.(I didn't want to swap till it was OK) You'll have to override the IP address to get the new one.

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 08, 2008, 06:41:59 am
Probably totally unrelated, but here is another data point. I turned on the honoree section for the contribution process and filled it in this time. It displayed on he Thank you page with some some incorrect formatting and no title for that section even though it did create the blue separator line/box. I filled in Salutation/first name/last name but no email address.
Code: [Select]
Contribution Information
Amount: $ 200.00
Date: August 8th, 2008 9:32 AM
Transaction #: test00000023
: Ms Great Lady
Email :

Slightly diff ormatting on the actual emailed receipt. No email label(OK I didn't fill it in) but also still no title for section
Code: [Select]
Contribution Information
===========================================================
Amount: $ 200.00
Date: August 8th, 2008  9:32 AM
Transaction #: test00000023

===========================================================

===========================================================
Ms Great Lady

===========================================================
Billing Name and Address

The receipt looks the same. Is the debug info logged someplace else? Or did I need to turn on BackTrace also. From the label I thought that was for transaction failures.
Code: [Select]
===========================================================
Additional donation details
===========================================================
 custom_3 : Array
 custom_5 : Array
 custom_7 : Array


===========================================================
test v20 custom ield
===========================================================
 custom_8 : Array



MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 08, 2008, 07:02:38 am
OK I found the CiviCRM.log file in the Drupal Files folder. But at the moment all the entries are dated from a few days ago. I'll try turning on the backtrace also to see if that helps. Opps, I just checked and I turned that on when I did debug

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 08, 2008, 07:19:29 am
Lobo Don't know iff this is the incident that ou are thinking of. It has similarities, but it is an older release 1.7 and has funky regular fields also.
http://issues.civicrm.org/jira/browse/CRM-2017
But then it gets commented on with 1.9 & 20,0 by alan who refers to a fix at 10064 which dosn't do it.

But Alan also mentions :
in my example, it was due to a household field being included in the profile, which confused the 'getProfileType' function.

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 09, 2008, 09:22:55 am
Hi Lobo,

I have created the Custom profile group and the contrib page for the problem we(actually more you) were working on earlier.

Since I can't see the emails from the demo site, I can't be sure if it is generating the same problem on the demo site. But I duplicated everything I could think of, even the disabled field in the group

The New group and contrib on the drupal demo site URLs:

Contrib Page - http://drupal.demo.civicrm.org/civicrm/admin/contribute?action=update&reset=1&id=3

MacRonin - Proile http://drupal.demo.civicrm.org/civicrm/admin/uf/group/field?reset=1&action=browse&gid=2

Custom field Group - http://drupal.demo.civicrm.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=2

Thanks for your help with this, If there is anything else you need please let me know.

Others, you are welcome to look at the records but please don't edit. I am trying to duplicate a problem I have on my site.

Paul

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: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?
August 11, 2008, 02:37:48 pm

1. this only happens in test mode. the code works fine in live mode (i.e. real transactions)

2. this has been fixed for 2.1

3. i'm reluctant to patch 2.0 since this is an annoying but not critical bug :). however here is the svn diff for the two files if you want to manually patch your install

Code: [Select]
Index: CRM/Contribute/BAO/ContributionPage.php
===================================================================
--- CRM/Contribute/BAO/ContributionPage.php (revision 16570)
+++ CRM/Contribute/BAO/ContributionPage.php (working copy)
@@ -85,7 +85,7 @@
      * @access public
      * @static
      */
-    static function sendMail( $contactID, &$values )
+    static function sendMail( $contactID, &$values, $isTest = false )
     {
         require_once "CRM/Core/BAO/UFField.php";
 
@@ -128,6 +128,17 @@
 
             require_once 'CRM/Contact/BAO/Contact.php';
             list( $displayName, $email ) = CRM_Contact_BAO_Contact::getEmailDetails( $contactID );
+
+            if ( $isTest &&
+                 ! empty( $params['custom_pre_id'] ) ) {
+                $params['custom_pre_id'][] = array( 'contribution_test', '=', 1, 0, 0 );
+            }
+
+            if ( $isTest &&
+                 ! empty( $params['custom_post_id'] ) ) {
+                $params['custom_post_id'][] = array( 'contribution_test', '=', 1, 0, 0 );
+            }
+
             self::buildCustomDisplay( $values['custom_pre_id'] , 'customPre' , $contactID, $template, $params['custom_pre_id'] );
             self::buildCustomDisplay( $values['custom_post_id'], 'customPost', $contactID, $template, $params['custom_post_id'] );
 
Index: CRM/Contribute/BAO/Contribution.php
===================================================================
--- CRM/Contribute/BAO/Contribution.php (revision 16570)
+++ CRM/Contribute/BAO/Contribution.php (working copy)
@@ -870,7 +870,7 @@
         // finally send an email receipt
         require_once "CRM/Contribute/BAO/ContributionPage.php";
         $form->_values['contribution_id'] = $contribution->id;
-        CRM_Contribute_BAO_ContributionPage::sendMail( $contactID, $form->_values );
+        CRM_Contribute_BAO_ContributionPage::sendMail( $contactID, $form->_values, $contribution->is_test );
     }
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 11, 2008, 03:36:21 pm
GMail is still having problem, but I found a way to access via the HTML interface. But its a good news/bad news situation. The problem that caused me to open this thread appears to not occur on Live transactions (As lobo said) Yeah !! :-)

But here is the bad news. A problem that I though had ben resolved DOES appear. I first noticed it during my switch from 1.8php4 to 1.8php5 and that was what caused me to rush my upgrade to 2.0 (It was supposed to be fixed in 2.0)

Up till this Live transaction, all my transactions under php5 had been test. And when I got to v2.0 it had appeared that the old problem had indeed been resolved, but when I did the Live transaction. It was still there :-(  The billing person's name gets replaced with the name of a custom field. See issue at http://issues.civicrm.org/jira/browse/CRM-2630

Code: [Select]
===========================================================
Billing Name and Address
===========================================================
Other notes
PO box 0000
New York, NY 10001
US

ARRGH !!!
« Last Edit: August 11, 2008, 03:39:44 pm by MacRonin »

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround av
August 12, 2008, 11:18:39 pm
New problem has also been solved.
Check my new forum post or the issue mentioned above for tip on how I did it. Ok, actually lobo pointed me to an old patch(from 1.9) that fixed it, but I had to put it on a 2.0.5 system.  ;)

Don't worry it wasn't bad
« Last Edit: August 12, 2008, 11:20:11 pm by MacRonin »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded to 2.0.5 - now have "custom_3 : Array" in receipt. Is workaround avail?

This forum was archived on 2017-11-26.