I get this error with the latest Ubercart plus pathauto-6.x-2.x-dev:
Fatal error: Call to undefined function _pathauto_include() in /sites/all/modules/ubercart/uc_catalog/uc_catalog.module on line 525

On the forums, the following solution is given:

You must change the line 525 of the catalog.module to include pathauto correctly from

_pathauto_include() ;

to

module_load_include('inc', 'pathauto'); 

A search for the error shows several instances where this is the stock answer, that "It's bad form to rely on an private module function (functions that start with an underscore). You should use module_load_include('inc', 'pathauto') instead."

Comments

liza’s picture

Priority: Normal » Critical

i had the same exact problem. can we please have this cleaned up by the Ubercart team?

Starminder’s picture

subscribe

tr’s picture

tr’s picture

Status: Active » Fixed

Committed. Note that the reason _pathauto_include() was used in the first place was that module_load_include() didn't exist in Drupal 5 when Ubercart was first developed. It's not a question of "bad form", it's that it was the only way to do it back then.

butler360’s picture

Thanks for the commit. I wasn't saying it was bad form, though, just quoting someone else.

Status: Fixed » Closed (fixed)

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

Dubber Dan’s picture

When you say it's been committed, what are you meaning, as I'm running Ubercart 6.x-2.4 and am getting this error.

Does that mean I'm running an old version of 6.x-2.4?

Dubber Dan’s picture

Anyone?

I'm running Ubercart 6.x-2.4 with Pathauto 6.x-2.0-alpha3 so am unsure where you say this has been committed to and how to get fix it.

butler360’s picture

Since I created this as a 2.4 issue and 2.4 is the current release version, when they say it has been committed they mean to the "dev" release. So you can upgrade to the dev release (last modified Nov 28th) to get the fix or wait until the next stable release, which would be 2.5 and presumably include the fix as well.

It's easiest to look at the release dates on the project page if you want to know if something has a fix you're looking for. Also look at "View CVS Messages" and you can see what has been committed to what release.

Dubber Dan’s picture

Great thanks, for clearing that up. So if I don't want to run the dev version, the thing to do will be to alter the catalog module as per your original post

butler360’s picture

Yep, and it's pretty easy.

j0nathan’s picture

Subscribing.

seemas’s picture

thank you for post butler360! it helped me to solve the problem when i got a white screen after i submit a new term in vocabulary with core drupal taxonomy module or taxonomy manager. So it started after installing ubercart+catalog.

Subscribing too

ratioswitch’s picture

Issue tags: +UberDrupal, +Taxonomy PathAuto, +Fatal error: Call to undefined function

Subscribing...

I had the same issue with my development install of Drupal 6.20 ... of which was also successfully fixed by making the 1-line change to catalog.module on line 525 as detailed above (http://drupal.org/node/889304).

Error Received

On WinXP:
Fatal error: Call to undefined function _pathauto_include() in C:\xxxx\profiles\uberdrupal\modules\ubercart\uc_catalog\uc_catalog.module on line 525

On Ubuntu:
Fatal error: Call to undefined function _pathauto_include() in /home/xxx/profiles/uberdrupal/modules/ubercart/uc_catalog/uc_catalog.module on line 525
--
--
To assist the developers of the affected modules, I've provided the following details (for reference).
--
--

My Local Drupal Installation Stack

  • Acquia Drupal Stack 1.2.32 (Drupal core 6.20, Apache/2.2.17 (Win32), PHP/5.2.14, MySQL server 5.1.53)
  • Pathauto 6.x-2.0-alpha3
  • Uberdrupal Installation Module 6.x-1.0-alpha8 (Ubercart 6.x-2.4, see reference links below)
  • Taxonomy Browser 6.x-1.4
  • Taxonomy Manager 6.x-2.2
  • Tagadelic 6.x-1.2

Reference Links

Cheers,
_rs

alfthecat’s picture

Status: Closed (fixed) » Active

+ 1
Confirming this issue to on several sites.

Pathauto 6.x-.2.x, Drupal 6.17 to 6.20

UC 2.x branche.

tr’s picture

Status: Active » Closed (fixed)

This issue has been fixed in -dev, as stated above.