Closed (fixed)
Project:
Ubercart
Version:
6.x-2.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Aug 2010 at 21:42 UTC
Updated:
31 Jan 2011 at 18:34 UTC
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
Comment #1
liza commentedi had the same exact problem. can we please have this cleaned up by the Ubercart team?
Comment #2
Starminder commentedsubscribe
Comment #3
tr commentedMarked #906102: Undefined function _pathauto_include() as a duplicate.
Comment #4
tr commentedCommitted. 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.
Comment #5
butler360 commentedThanks for the commit. I wasn't saying it was bad form, though, just quoting someone else.
Comment #7
Dubber Dan commentedWhen 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?
Comment #8
Dubber Dan commentedAnyone?
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.
Comment #9
butler360 commentedSince 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.
Comment #10
Dubber Dan commentedGreat 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
Comment #11
butler360 commentedYep, and it's pretty easy.
Comment #12
j0nathan commentedSubscribing.
Comment #13
seemas commentedthank 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
Comment #14
ratioswitch commentedSubscribing...
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 525On 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
Reference Links
Cheers,
_rs
Comment #15
alfthecat commented+ 1
Confirming this issue to on several sites.
Pathauto 6.x-.2.x, Drupal 6.17 to 6.20
UC 2.x branche.
Comment #16
tr commentedThis issue has been fixed in -dev, as stated above.