Fatal error: Call to undefined function taxonomy_node_get_terms() in /mysite/modules/ubercart/uc_googleanalytics/uc_googleanalytics.module on line 163

I already posted one other bug yesterday regarding ubercart and views module. I also see a lot of other errors and notices all over the place in drupal 7 version of ubercart. I'll try to report them all as I go but at the moment this version isn't ready for production.

Comments

draku007’s picture

draku007’s picture

And here is what I got after refreshing the page:

•Notice: Undefined index: file_download in uc_file_user_presave() (line 336 of /mysite/modules/ubercart/uc_file/uc_file.module).
•Notice: Undefined index: file_add in uc_file_user_presave() (line 361 of /mysite/modules/ubercart/uc_file/uc_file.module).
•Unable to send e-mail. Contact the site administrator if the problem persists.
.

draku007’s picture

I'll just keep adding everything I come across today to this issue.

I wanted to view the order in the store configuration section: http://www.mysite.com/admin/store/orders/6

Fatal error: Unsupported operand types in /mysite/modules/ubercart/payment/uc_payment/uc_payment_order_pane.inc on line 39

http://www.mysite.com/admin/store/orders/6/invoice

EntityMetadataWrapperException: Unknown data property order_total. in EntityStructureWrapper->getPropertyInfo() (line 294 of /home1/existonl/public_html/modules/entity/includes/entity.wrapper.inc).

http://www.mysite.com/admin/store/settings/payment/edit/gateways

* Notice: Use of undefined constant UC_CREDIT_AUTH_ONLY - assumed 'UC_CREDIT_AUTH_ONLY' in uc_paypal_uc_payment_gateway() (line 167 of /home1/existonl/public_html/modules/ubercart/payment/uc_paypal/uc_paypal.module).
* Notice: Use of undefined constant UC_CREDIT_PRIOR_AUTH_CAPTURE - assumed 'UC_CREDIT_PRIOR_AUTH_CAPTURE' in uc_paypal_uc_payment_gateway() (line 167 of /home1/existonl/public_html/modules/ubercart/payment/uc_paypal/uc_paypal.module).
* Notice: Use of undefined constant UC_CREDIT_AUTH_CAPTURE - assumed 'UC_CREDIT_AUTH_CAPTURE' in uc_paypal_uc_payment_gateway() (line 167 of /home1/existonl/public_html/modules/ubercart/payment/uc_paypal/uc_paypal.module).

http://mysite.com/cart

Notice: Undefined index: model in uc_file_uc_add_to_cart() (line 535 of /home1/existonl/public_html/modules/ubercart/uc_file/uc_file.module).

http://www.mysite.com/cart/echeckout/review?token=EC-90R71305PX316521G&P...

•Notice: Undefined index: have_details in uc_paypal_ec_review() (line 202 of /home1/existonl/public_html/modules/ubercart/payment/uc_paypal/uc_paypal.pages.inc).
•Notice: Undefined index: SHIPTOSTREET2 in uc_paypal_ec_review() (line 231 of /home1/existonl/public_html/modules/ubercart/payment/uc_paypal/uc_paypal.pages.inc).
.

tr’s picture

@draku007: Please restrict your comments to the original issue. If you find other problems, please search the issue queue first to see if they've been reported (Do #1019980: Undefined variable and index or #1003128: Use of undefined constants in PayPal payment module look familiar, for example?) - if they haven't been reported then you can open a new issue for each problem. If they have been reported and have proposed fixes, please try out those fixes and post your experience with the proposed patch. Maybe contribute a patch to fix some of these if they're important to you.

andyl29’s picture

Version: 7.x-3.x-dev » 7.x-3.0-beta2

Having the same problem.

"Fatal error: Call to undefined function taxonomy_node_get_terms() in /home/kbbrandt/public_html/drupal/sites/all/modules/ubercart/uc_googleanalytics/uc_googleanalytics.module on line 162"

Any help would be great. Thanks

daniel bornman’s picture

Status: Active » Needs review
StatusFileSize
new800 bytes

I've attached a patch that fixes the issue. It fetches the term id from the node object loaded and then loads the term name from the term id. Please test and confirm. Thanks.

Status: Needs review » Needs work

The last submitted patch, uc_googleanalytics.patch, failed testing.

daniel bornman’s picture

Status: Needs work » Needs review
StatusFileSize
new924 bytes

I accidentally made the previous patch against ubercart-7.x-3.x-dev but marked it as 7.x-3.0-beta2, submitting a new one made against beta2 this time (hope that was the problem)

daniel bornman’s picture

StatusFileSize
new962 bytes

Sorry, the previous patch will fail as well - it seems the original test failed cause I didn't include the path to the uc_googleanalytics.module...

Status: Needs review » Needs work

The last submitted patch, uc_googleanalytics.patch, failed testing.

daniel bornman’s picture

Status: Needs work » Needs review
StatusFileSize
new962 bytes

getting closer...

Status: Needs review » Needs work

The last submitted patch, uc_googleanalytics.patch, failed testing.

daniel bornman’s picture

Version: 7.x-3.0-beta2 » 7.x-3.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.01 KB
tr’s picture

@danielbornman: Don't worry too much about the testbot right now. We just turned it on in the Ubercart queue, and it's having some difficulties that the testbot maintainers know about and are working to fix. The non-applicable patch failures are due in part to the testbot being unable to deal with fixed releases like 7.x-3.0-beta2. Your patch from #14 is "Postponed" because Ubercart tests require dependent modules like Views and Rules to be installed, and the testbot can't currently handle that.

Anyway, your patch in #14 is the right format and applies without an error, and the Ubercart test cases run without error with your patch applied. (Although, that's not too surprising because there are no tests for uc_googleanalytics yet ...).

So the only remaining question is whether your patch does the right thing and sends the right terms to Google Analytics.

daniel bornman’s picture

@TR that explains it, thanks... was scratching my head there for a while :)

As for the remaining question - it should deliver exactly the same end result as the original unpatched version, just without calling taxonomy_node_get_terms().

orendain’s picture

I checked out the patch in #14. Worked well, great job.

longwave’s picture

Status: Needs review » Fixed

Committed, thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.