Hello,

After saving node with file upload field, this error messages shows in a white screen:
Fatal error: Call to undefined function _pathauto_include() in /home/abc/public_html/base/sites/all/modules/filefield_paths/filefield_paths.module on line737

File is uploaded, node is saved.

Other info: use latest releases of File Aliases 6.x-1.1, Pathauto 6.x-2.x-dev, Drupal 6.17

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Version: 6.x-1.4 » 6.x-1.x-dev

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.

basicmagic.net’s picture

i tried the suggested fix- to filefield_paths.module...
simple... just the one line

find:

_pathauto_include();

replace with:

module_load_include('inc', 'pathauto');

and it works perfectly

thanks dave!

tcibah’s picture

Thanks Dave & basicmagic.net. Will try that fix in few days. Now we just disabled that module.

Starminder’s picture

subscribe

mattcasey’s picture

#2 Worked for me too thanks!

rootwork’s picture

Status: Active » Reviewed & tested by the community

This works for me as well.

tomgf’s picture

FileSize
417 bytes

I have created a patch to solve this issue.
(see next comment where the same patch with a proper name is attached)

tomgf’s picture

Sorry about the double post but I have renamed the patch according to Drupal guidelines.

giorgio79’s picture

+1, can we get this committed please? :)

flickerfly’s picture

This patch worked like a charm, would appreciate having it committed.

flickerfly’s picture

Also, this is a blocker issue for the rcourier module.

rootwork’s picture

RTBC!

Deciphered’s picture

Issue tags: +FileField Paths 2.x

This will be fixed in the upcoming 2.x release.

I may also consider fixing it in the 1.x releases, but no guarantee.

Apologies for the inconvenience, it is a side effect of using a modules non-API functions, in a perfect world Pathauto would be the module extending FileField Paths functionality with a FileField Paths API function, which will be possible in the 2.x release.

Cheers,
Deciphered.

asb’s picture

This issue became virent for me for the first time after upgrading to alpha3 of 'Pathauto'. (Duplicate) issue: #935948: Call to undefined function _pathauto_include()

I'd also like to see this fixed in the current Filefield Paths release!

Thanks, -asb

j0nathan’s picture

Same issue, subscribing.

Fidelix’s picture

The can also confirm that the patch fixes the issue.

IMHO, this has to be fixed ASAP in the current module version.

Deciphered’s picture

Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-6--1: http://drupal.org/cvs?commit=434406

Deciphered’s picture

As a side note, there is a very high chance that Pathauto support will be scrapped in 6.x-2.x and and further official 6.x-1.x builds in favor of CTools, which provides an official approach to clean strings instead of relying on a private function that could be altered at any time (as per this issue).

Status: Fixed » Closed (fixed)

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

benford’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Status: Closed (fixed) » Needs review

Thanks for posting here folks! I can confirm that the solution proposed by basicmagic.net, solved my problem perfectly. I was facing an error encountered post image upload, in the exact manner as described by the original poster.

The only problem is that I encountered this bug in 6.x-1.4, after the patch had been committed. Any thoughts?

gg4’s picture

...I encountered this bug in 6.x-1.4

Subscribing

cookiesunshinex’s picture

I'm also getting the error in 6.x-1.4

EgbertB’s picture

Same here: Patch not in the 6.x-1.x whatever
Mayb eit is in the dev version: Is it production ready?

mattcasey’s picture

Just checked and the 1.x dev version includes the patch, but 1.4 does not.

roball’s picture

Assigned: Unassigned » Deciphered
Status: Needs review » Fixed

The fix is now officially available in version 6.x-1.5.

asb’s picture

Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -FileField Paths 2.x

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