Call to undefined function uc_price() in uc_product.module on line 1421

Project:Ubercart Contributions
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

This is with Ubercart-2.x-RC3

Version: 
Ubercart 2.x-dev
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Call to undefined function uc_price() in uc_product.module o
qazwsx's picture
Offline
Joined: 05/28/2009
Juice: 58
Re: Call to undefined function uc_price() in uc_product.module o
Assigned to:Lyle» qazwsx

Oh thanks It was nodewords, In the Meta Tags settings page, you should turn off the "use teaser if description is empty" setting, as that will prevent this error from happening.

Ascenti0n's picture
Offline
Joined: 04/01/2009
Juice: 24
Thank you - I was ready to through in the towel
Assigned to:qazwsx» Ascenti0n

Hi, thanks for your tip, which worked for me. I almost threw in the towel. With Ubercart and with Drupal.

It's not the first time I have come accross some 'brick wall' that stops everything dead. I've had the white screen of death a few times, and I am now up to my limit with PHP memory with my shared hosting account.

I don't think Drupal will be a long term solution for me. I think I'll code my own system from scratch and then migrate over when done.

Sorry, just had to get that all off my chest.

thanks again.

ckeen's picture
Offline
Joined: 06/17/2009
Juice: 43
Re: Thank you - I was ready to through in the towel
Assigned to:Ascenti0n» ckeen

lol amen brother. I'm in the same boat as you... been working on a project that should have taken like a month but it's taken like 8 months due to stupid little tiny things that turn out to be brick walls....

had to get it out thanks

Thad's picture
Offline
Joined: 06/26/2009
Juice: 2
Re: Re: Thank you - I was ready to through in the towel
Assigned to:ckeen» Thad

This thread saved me as well Smiling

rich.yumul's picture
Offline
Getting busy with the Ubercode.
Joined: 05/22/2009
Juice: 38
Re: Re: Re: Thank you - I was ready to through in the towel
Assigned to:Thad» rich.yumul

add me to that list on the people that got saved with this thread. Smiling

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Thank you - I was ready to through in the towel
Assigned to:rich.yumul» torgosPizza

Strange thing is, I'm getting this error now too. Except I don't use Nodewords or Meta Tags, etc.

Can I get a pointer as to what I should look for? The d.o. pages talk about moving hook_init functions to hook_preprocess_page. It's obviously a 3rd-party module that's causing the problem, and until I've figured out how to do backtraces on this stack, any tricks of the trade (or at least things to check) would be appreciated Smiling

--
Help directly fund development: Donate via PayPal!

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Thank you - I was ready to through in the to

It turns out to just be a {system} table weight issue. I set the weight for uc_price to be -10, way ahead of the other modules trying to call it, and that seems to have solved the problem.

Seems like this is an issue I keep seeing time and again. Wonder if there's a fix being cooked up.

--
Help directly fund development: Donate via PayPal!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: Re: Re: Thank you - I was ready to through in th
Assigned to:torgosPizza» Lyle

You mean uc_store, right? uc_price isn't a module, I don't think.

At any rate, it might be that something is using uc_currency_format() before uc_store_init() is called. This function is now a wrapper for uc_price(), and I'm just now realizing how that can cause problems.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Re: Re: Thank you - I was ready to through i
Assigned to:Lyle» torgosPizza

Yeah sorry. Set uc_store to a lower weight. Weird thing is the only pages this seemed to happen on were admin order detail pages. I can reset the store module weight and do more digging if you'd like.

--
Help directly fund development: Donate via PayPal!

dancarlson's picture
Offline
Joined: 10/02/2009
Juice: 2
where do we set the uc_store weight
Assigned to:torgosPizza» dancarlson

where do i go to set the weight of uc_store?

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: where do we set the uc_store weight
Assigned to:dancarlson» torgosPizza

Well it's a database table thing, but we're trying to narrow down the actual issue. (Read the drupal.org page that's linked in the 2nd post). Setting the uc_store weight is really more of a band-aid than an actual fix.

--
Help directly fund development: Donate via PayPal!

jrchew's picture
Offline
Joined: 07/27/2009
Juice: 14
Thank you
Assigned to:torgosPizza» jrchew

Nice tip, saved me many hours of debugging!

Everyone,

You don't want to leave Drupal/UC Smiling

UberCart is the most flexible system available. Sure, there's a learning curve and you run into a bug or two, but in the end it's always just a one line fix somewhere, rather than a whole re-write. Also, Think about the great community of people here to help you if you get stuck with something like this Smiling

If you do go a different route, from my personal experience, may I suggest you stay far, far away from anything to do with Joomla.

Good luck to all.

N1ckhead's picture
Offline
Joined: 01/05/2010
Juice: 2
To Change the Table Weight
Assigned to:jrchew» N1ckhead

Hey - I didn't know how to change the table weight either (DB noob).

TR in the #drupal-ubercart IRC channel pointed me in the right direction...

In phpmyadmin, find and click the "system" table in the left hand column. The next page you see will have a "browse" tab at the top - click it. Find uc_store and click the edit button. Change the weight to -10.

I realize this is very basic for most here, but this will probably help someone.

Thanks guys.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: To Change the Table Weight
Assigned to:N1ckhead» torgosPizza

Basic to some, sure, but it's really not the ideal solution. (A normal Mom and Pop store owner would never know how to do that, for example.)

Glad you got it working.

--
Help directly fund development: Donate via PayPal!

soso7df's picture
Offline
Joined: 05/18/2011
Juice: 3
#16
Category:» bug report
Assigned to:torgosPizza» Guest

Naah ... changing the weight of the uc_store module doesn't help. Is someone working on the trobleshoot? Would be glad to get this working,r eally!