Call to undefined function drupal_is_front_page()

shadyman@errora... - September 15, 2007 - 03:55
Project:Multiple Domains
Version:5.x-1.x-dev
Component:code
Category:support request
Priority:normal
Assigned:Unassigned
Status:patch (code needs work)
Description

I'm getting this error occasionally when loading the front page of a secondary domain after loading the primary one:

Fatal error: Call to undefined function drupal_is_front_page() in /home/content/e/r/r/errorad/html/modules/multidomain/multidomain.module on line 532

It goes away with a refresh.

Any idea what causes it?

#1

shadyman@errora... - September 17, 2007 - 01:26

I got it again on http://matthewlange.name/admin/settings/multidomain/settings/http_matthe...

This was by clicking on "http://matthewlange.name" on the Multiple Domains configuration page (http://erroraccessdenied.com/admin/settings/multidomain/settings)

I clicked once before, and got "You are not authorized to view this page." I tried again, and got the call to undefined function.

#2

shadyman@errora... - September 17, 2007 - 02:21
Status:active» fixed

Update: I used the settings.php patch for singlesignon (see http://drupal.org/node/129455 for details), and it seems to be working.

I'll re-open the ticket if it comes back.

#3

shadyman@errora... - September 18, 2007 - 23:48
Status:fixed» active

Nope, still does it. I changed the secondary domains to be rewritten as "www.", and it still has the problem.

#4

ngmaloney - April 1, 2008 - 04:03
Status:active» patch (code needs work)

I encountered the same problem. When viewing the home page of a secondary domain I would get the "Call to undefined function drupal_is_front_page()" error. The error would not go away even if page was refreshed.

I had a project that needed to go out the door so was fairly desperate. I ended up adding the following to multidomain.module and it resolved the problem:

LINE 532:

$front = drupal_is_front_page();

Change to:
if(function_exists('drupal_is_front_page')) {
   $front = drupal_is_front_page();
}

Not sure if this is a legitimate patch but it got the job done.

 
 

Drupal is a registered trademark of Dries Buytaert.