Doesn't work with 2.2.3?

Project:CiviCRM Integration
Component:Code
Category:
Priority:critical
Assigned:Unassigned
Status:active
Description
Project: 
uc_civicrm

Things aren't work as per the design on Drupal 6.x / CiviCRM 2.2.3 (the latest release): Any other test reports on this?

As far as my case goes, The module added an activity of type 'Purchase', and that's about it.

* There is no Activities Tab in the Contact Record or the Contact Dashboard.
* On Checkout, (From the uc checkout review) -Nothing happens, but for an endlessly long wait, which is followed up with a CiviCRM fatal error screen - *Not Enough Data to Create an Activity Object*.
* No Group Called Purchasers was added.

* My Contact Record had an address already. This wasn't pre-populated on the pre-checkout form (I wonder if this is the expected behavior in the first place?)
* I still haven't managed to test whether or not a new contact is added on anonymous checkout or if details are successfully appended to CiviCRM at all.

I reckoned that the 'Not enough data to create an activity object' was probably because of the absence of $params['contact_assignee_id'] in CRM_Activity_BAO_Activity::create(). So I tried assigning it to the same $cid as the contact himself, But this wouldn't work either. The screen still hangs.

As I mentioned, This is on a Drupal 6.10 Setup, With Ubercart 2.0RC & CiviCRM 2.2.3
Any pointers?

Version: 
Ubercart 2.0-RC1
dharmatech's picture
Offline
Bug Finder
Joined: 01/28/2008
Juice: 94
Re: Doesn't work with 2.2.3?

The CiviCRM developers changed the calling sequence of civicrm_contact_get() between 2.2.2 and 2.2.3, and I haven't yet had time to change uc_civicrm.module accordingly.

-- Walt

p6@drupal.org's picture
Offline
Joined: 05/25/2009
Juice: 9
Walt Thanks for telling me.
Assigned to:dharmatech» p6@drupal.org

Walt

Thanks for telling me. Coincidentally, I too figured the same thing out today, and I got the thing working with a dirty fix (Passing a depreceated argument 'true' to get the old behavior back on civicrm_contact_get() and it works now)
I'll try and work on doing this the right way (conforming to the new API standard) and hopefully throw in a patch in the next couple of days

What I can't figure out is why the Review Order screen takes so long before the operation is completed. This is on a local dev setup, running CiviCRM and Drupal on separate DBs.

p6@drupal.org's picture
Offline
Joined: 05/25/2009
Juice: 9
Re: Walt Thanks for telling me.

Never mind about the 'taking-long' issue. After tracing through both CiviCRM and Ubercart code for hours, I found out that it was my sendmail which was the culprit. Fantastic module though. I'll try and contribute some improvements whenever I can.

dharmatech's picture
Offline
Bug Finder
Joined: 01/28/2008
Juice: 94
Quote:Never mind about the
Assigned to:p6@drupal.org» dharmatech
Quote:

Never mind about the 'taking-long' issue. After tracing through both CiviCRM and Ubercart code for hours, I found out that it was my sendmail which was the culprit.

OT: We switched to Postfix. It gives us more ability to control what happens in unusual situations.

-- Walt

nkinkade's picture
Offline
Joined: 06/11/2009
Juice: 22
patch for >=2.2.3 compatibility
Assigned to:dharmatech» nkinkade

There may be other problems, but this patch seems to fix at least one manifestation of the API change mentioned in this thread:

--- a/sites/default/modules/ubercart/contrib/uc_civicrm/uc_civicrm.module
+++ b/sites/default/modules/ubercart/contrib/uc_civicrm/uc_civicrm.module
@@ -6,6 +6,7 @@
  * Module to integrate Ubercart with CiviCRM
  */

+
/**
  * Implementation of hook_help
  *
@@ -228,6 +229,11 @@ function uc_civicrm_action_order_to_civicrm($order) {
   // retrieve the contact object for this contact
   $params = array('contact_id' => $cid);
   $contact = civicrm_contact_get($params);
+  include_once 'CRM/Core/BAO/Domain.php';
+  $crmVersion = CRM_Core_BAO_Domain::version();
+  if ( version_compare($crmVersion, '2.2.3', '>=') ) {
+    $contact = array_pop($contact);
+  }

   // add an activity 'Purchase' for this contact
   $rc = _uc_civicrm_add_activity_purchase($contact, $order->order_id);

--Nathan

Sansui's picture
Offline
Joined: 06/05/2008
Juice: 154
Re: Doesn't work with 2.2.3?
Assigned to:nkinkade» Sansui

I also just installed ubercart with latest version of civicrm and the integration module. There was no new activity created for purchase, and essentially nothing at all seems to have happened that would indicate anything in the integration worked with this version.

I too am looking for a way to populate customer shipping/billing address from pre-existing Civicrm contacts, instead of the other way around.

upperholme@drupal.org's picture
Offline
Joined: 03/11/2009
Juice: 21
Trying to integrate D6.13 and CiviCRM 2.2.7
Assigned to:Sansui» upperholme@drupal.org

I've installed the integration module, and applied the patch as suggested at http://www.ubercart.org/contrib/3762 (although at slightly different line numbers in the 2.2.7 code.
Essentially the module seems to do nothing at all. I'm going to try the patch shown in this thread to see if that helps at all. Unless anyone out there has this working on a similar installation? Any advice most welcome. I'm not a coder, so I'm working at or beyond my scope of understanding here.

upperholme@drupal.org's picture
Offline
Joined: 03/11/2009
Juice: 21
problems

I've just patched my module with this (http://www.ubercart.org/issue/11131/doesnt_work_223#comment-40609) and my whole site stopped working - white screens all over the place.

bdornbush's picture
Offline
Joined: 11/04/2009
Juice: 4
Any progress?
Assigned to:upperholme@drupal.org» bdornbush

I have just inherited a web site that was built with CiviCRM 2.2.3, and I am trying to add this module, and discovered that this bug appears. See attachment for a screen shot. It seems that the thread has been around for a while, and I hope that work to fix the bug has not been abandoned. Is there any hope of getting it working? It's important to my current work.

AttachmentSize
error1.jpg 14.85 KB
janette's picture
Offline
Joined: 06/22/2009
Juice: 22
not enough data to create activity object
Assigned to:bdornbush» janette

would the patch listed above fix this error?

Ubercart 6.x-2.2
CiviCRM 2.25