Closed (fixed)
Project:
UC CiviCRM
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 May 2012 at 21:07 UTC
Updated:
31 May 2012 at 15:40 UTC
Jump to comment: Most recent file
I am getting the following error:
Fatal error: Call to undefined function uc_order_customer_orders() in /home/username/public_html/sites/all/modules/uc_civicrm/uc_civicrm.module on line 84
The error shows up as follows:
Line 83-84 of uc_civicrm.module:
module_load_include('inc', 'uc_order', 'uc_order.customers');
$output = uc_order_customer_orders($uid);| Comment | File | Size | Author |
|---|---|---|---|
| #9 | uc_civicrm_uc_order_customer_orders_fatal_error-1567946.patch | 3.51 KB | laryn |
Comments
Comment #1
dharmatech commentedDo you have the uc_order module enabled?
Comment #2
larynYes, I had checked that already:
At the moment I've just commented out line 84, which truncates the functionality I'm sure, but I don't get the errors any more. (The purchases tab is greyed out in the contact view).
Comment #3
dharmatech commentedWhat version of Ubercart do you have installed?
Comment #4
dharmatech commentedLooks like things have changed w/Ubercart... they've (again) changed how to get customer order information. If you want to dig into it a bit and take a stab at a patch, I can help you get this issue fixed.
Comment #5
larynOkay, I'll give it a shot.
Comment #6
dharmatech commentedLet me know if you get stuck. Civi renders an HTML snippet when someone clicks the tab in the contact record. So the code needs to know a URL to get the snippet and a count to display in the tab (optional). My guess is the Ubercart folks now have an API to get order information.
Comment #7
larynI found out Ubercart replaced this function with a view. What do you recommend? Looks like we could either duplicate the code from the previous UC release and make it part of UC CiviCRM, or use the view they have replaced it with -- although this would require a dependency of UC 7.0-rc3+
Reference: http://drupal.org/node/1372106
Comment #8
dharmatech commentedThanks for looking into it. Ideally we'd have an API to work with but since we don't, I vote to pull in the old uc_order_customer_orders() code. I took a quick look and it seems like it should drop right in... we can remove the call to load the .js file.
Do you want me to generate the patch or do you want to? As soon as we have a tested patch, I'll pull it in and do a new release.
Comment #9
larynHere's my attempt at a patch. First ever.
Comment #10
dharmatech commentedThanks again laryn. I used your patch and also removed the module_load_include() call. Seems to test out ok so I pushed the changes to -dev branch. If you want to verify it works for you in -dev, I'll create a new stable release.
You can pull from git or wait ~24 hours for a new tarball.
Comment #11
larynLatest -dev works for me.
Comment #12
dharmatech commentedGreat. I tagged a new 7.x-1.1 release and it should show up on the project page shortly.
Thanks again for your help.