In the pathauto_token_values function of pathauto.module there is a missing include. Almost all of the other functions have as their first line this call. _pathauto_include();

The pathauto_token_values function does not and therefor it throws the following error.

Fatal error: Call to undefined function pathauto_cleanstring() in /home/synchrophoto/mytestingsite.com/modules/pathauto/pathauto.module on line 401

When I modify the pathauto_token_values function in the pathauto.module to add the call to _pathauto_include(); , that error goes away. So it should be a very simple fix to do in the next version.

Hopefully this is not a dupe. I apologize in advance if it is.

CommentFileSizeAuthor
#4 require_code_191187.patch1.03 KBgreggles

Comments

greggles’s picture

What are the steps to repeat this bug? I've never encountered it so I want to understand how/why this happens.

dzazi’s picture

I wonder if this is related.

just updated from a 2.x dev version to 2.0, and get an error when i got to /admin/settings/pathauto

Fatal error: Call to undefined function pathauto_punctuation_chars() in /backup/home2/addis4/public_html/sites/all/modules/pathauto/pathauto.module on line 192

greggles’s picture

@dzazi Are you sure that the pathauto.inc file got uploaded? What does your admin/logs/watchdog say?

greggles’s picture

Title: Fatal error: Call to undefined function pathauto_cleanstring() » change includes to requires to highlight file inclusion problems more clearly
Status: Active » Needs review
StatusFileSize
new1.03 KB

I'm assuming that this is an include problem of some sort and I'd rather that if this fail it fail hard, so I'm going to change the include_once to require_once.

greggles’s picture

Status: Needs review » Fixed

Applied to both the 5.x-2.x and trunk.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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