Zen Cart Logo
Forums / General Questions / Call to undefined function

Call to undefined function

Locked

Views: 2,626

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
13 Sep 2010, 8:59 PM
#1
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Call to undefined function

Database Host: localhost (127.0.0.1)
Server OS: Linux 2.6.34.6 Database: MySQL 5.1.48
PHP Version: 5.2.13 (Zend: 2.2.0) HTTP Server: Apache

Zen Cart 1.3.7
Database Patch Level: 1.3.7
v1.3.6 [2007-02-24 19:55:45] (Version Update 1.3.5->1.3.6)
v1.3.5 [2007-02-24 19:55:43] (Version Update 1.3.0.2->1.3.5)
v1.3.0.2 [2006-09-08 10:26:10] (Fresh Installation)

I found this in /public_html/cache/ where the ZenCart resides.

[08-Aug-2010 04:00:14] PHP Fatal error:  Call to undefined function  zen_get_generated_category_path_rev() in /home/myclientname/public_html/includes/init_includes/init_canonical.php on line 19

The referenced code is unchanged from initial install, ie.

if (strstr($current_page, '_info') && isset($_GET['products_id'])) {

  $canonicalLink = zen_href_link($current_page, 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_GET['products_id'])) . '&products_id=' . $_GET['products_id']);

I was looking for a problem with the store. It seems that the transactions are being made in PayPal but the conformation is not being returned to Zencart. That is, there is money in the PayPal Account but the client has to call the customer to find out what customer purchased. The Zencart Transaction does not exist.

I go to <Admin>, <Customers>, <orders> the PayPal order does not exist. We have several transactions that are not recorded.

Did PayPal change something this past Friday?

Is this a Zencart situation, ie. Code missing?

Other methods of shopping work properly.

13 Sep 2010, 9:21 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Call to undefined function

/includes/init_includes/init_canonical.php

The referenced code is unchanged from initial install, ie.
init_canonical.php is NOT included in a default distribution
I think your statement is incorrect

13 Sep 2010, 11:01 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Call to undefined function

kobra:

init_canonical.php is NOT included in a default distribution
I think your statement is incorrect

Actually, the file:
/includes/init_includes/init_canonical.php

was added in v1.3.9 ...

Did you attempt to upgrade your site and not upgrade it completely? :unsure:

13 Sep 2010, 11:48 PM
#4
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Call to undefined function

Ajeh:

Actually, the file:
/includes/init_includes/init_canonical.php

was added in v1.3.9 ...

Did you attempt to upgrade your site and not upgrade it completely? :unsure:

I moved the site from one ISP to another ISP a couple months ago. There were no problems in the move of the database and software. There has been hundreds of transactions since the move.

There could have been an employee or someone called in by the owner who tried to upgrade. I was called into the situation today.

I guess if I'm going to clean up someone else's mess the rate just went up. Ha.

What else can I look at to see if there was an attempt to upgrade?

13 Sep 2010, 11:50 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Call to undefined function

I would compare the site to a clean v1.3.7 and to a clean v1.3.9f ...

14 Sep 2010, 12:08 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Call to undefined function

Forum5:

[08-Aug-2010 04:00:14] PHP Fatal error: Call to undefined function zen_get_generated_category_path_rev() ...
That function was added in v1.3.8a in the functions_categories.php file.

So, since you're getting messages from a 1.3.9 init_canonical file that's calling a function introduced in a 1.3.8 file, and your store says you're using v1.3.7, it seems pretty clear that someone's tried to cut corners and hack the init_canonical support onto your 1.3.7 install, instead of properly upgrading to v1.3.9.

Best solution: Upgrade.
Short-term solution: remove the init_canonical code you added, so the errors stop.

14 Sep 2010, 9:30 AM
#7
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Call to undefined function

DrByte:

That function was added in v1.3.8a in the functions_categories.php file.

. . .

Best solution: Upgrade.
Short-term solution: remove the init_canonical code you added, so the errors stop.

Thanks for the information on the function history. I'm with you up to the point that you say "remove the init_canonical code you added". I did not add the function however, I upgraded the site to 1.3.9f and the site is working properly now.

Coffee's on me for the crew at Zen Cart. Thanks for being there.
:clap:

14 Sep 2010, 9:34 AM
#8
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Call to undefined function

Ajeh:

I would compare the site to a clean v1.3.7 and to a clean v1.3.9f ...

DONE! I didn't do any comparing. I just did the upgrade. It went from 1.37~ to 1.3.9f and all is well.

As I told Dr. B. the coffee is on me tomorrow. Thanks for being there.

:hug:

14 Sep 2010, 9:36 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Call to undefined function

That's a big upgrade step. Be sure to test some purchases all the way from creating a new account through to finishing payment with a credit card.

14 Sep 2010, 9:46 AM
#10
forum5 avatar

forum5

Zen Follower

Join Date:
Jul 2006
Location:
Louisiana
Posts:
147
Plugin Contributions:
0

Re: Call to undefined function

DrByte:

That's a big upgrade step. Be sure to test some purchases all the way from creating a new account through to finishing payment with a credit card.

I added products, installed new shipping, installed new payment, made purchases with the new and the old, then removed the extra moduals I just installed.

The thing that I did not do, but I will now, is create a new user and make a purchase.

Thanks.

14 Sep 2010, 1:43 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Call to undefined function

Glad to hear the upgrade is going well ...

It is a good idea to go through each of the modules for Payment, Shipping and Order Total ...

1 Save the current settings to NotePad, as they will be lost when doing the next step

2 REMOVE the module

3 INSTALL the module

4 Reconfigure the module

This will set all of the modules current with any new configuration_keys that have been added ...