I received this error after updating to 7.x-2.7:

Fatal error: Call to undefined function language_url_split_prefix() in /home/mysite/sites/all/modules/pathologic/pathologic.module on line 316

This resulted in the website being broken and a WSOD. After downgrading to 7.x-2.6 all was fine again.

Comments

Garrett Albright’s picture

Crap, that's bad. I assumed that was a core function that was always available, but I guess that's not the case. Thanks for the heads-up; I'll try to get a fix release done within a couple of hours.

Garrett Albright’s picture

Status: Active » Closed (fixed)

Okay, just made a 2.8 release which should fix this problem. Again, thanks for bringing it to my attention.

Garrett Albright’s picture

Status: Closed (fixed) » Fixed

Whoops, wrong status.

caktux’s picture

Still getting the same error on line 317 and the locale module is enabled. I suppose language.inc must be included manually.

eule’s picture

hi

Fatal error: Call to undefined function language_url_split_prefix() in ./sites/all/modules/pathologic/pathologic.module on line 317

i update it today from 2.7 to 2.8 and get this error. i have a fresh site and get this error under admin/content

eule’s picture

Status: Fixed » Active

status change ;) ..i mean is not fixed yet

Garrett Albright’s picture

Arg, well, I can't replicate that file not being included when Locale is enabled, but I'll force it to be required anyway. 7.x-2.9 forthcoming; please give it a try and report back.

eule’s picture

Hi,
after updating to 2.9 the error is not gone Fatal error: Call to undefined function language_url_split_prefix() in ./sites/all/modules/pathologic/pathologic.module on line 320

the whole site works i mean only if i try to visit admin/content the error appears. but i am not sure haven't mutch tested

bago’s picture

Same problem here on most search_api views page, also with 2.9

To temporarily fix the issue I changed this line:

-    if (module_exists('locale')) {
+    if (module_exists('locale') && function_exists('language_url_split_prefix')) {

I have many caching options enabled and performance modules enabled.
Maybe you have to explicity load the module (module_load_include) in order to use that method...

ioanmar’s picture

I was getting the same exact error after updating pathologic module to 2.9. Replacing that line according to #9 fixed the issue. Thank you bago.

Garrett Albright’s picture

Version: 7.x-2.7 » 7.x-2.9

Now that's just crazy talk. We're require_once-ing the file that defines that function right before calling it; there's no possible way an undefined function error could be happening in 7.x-2.9. (But then again, there was no way it could be happening in 7.x-2.8, either, but now I'm sure of it.) Does anyone know what's going on here?

Garrett Albright’s picture

Title: Fatal error: Call to undefined function language_url_split_prefix() after update to 7.x-2.7 » Fatal error: Call to undefined function language_url_split_prefix() after update to 7.x-2.7 or later

Wait, I'm a dumbass. The function is in language.inc, not locale.inc, despite this all having to do with the Locale module. So I'm require_once-ing the wrong file.

Drama sigh. 7.x-2.10 forthcoming.

hass’s picture

Status: Active » Fixed

2.10 is out.

Status: Fixed » Closed (fixed)

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