Just installed the frameprevention module.

now when opening the site I get:

Fatal error: Call to undefined function: drupal_get_path_alias() in /home/sturgjoh/public_html/thetrack.org.uk/modules/frameprevention/frameprevention.module on line 85

Please can someone suggest what to do next.

thanks

John

Comments

mellow7’s picture

Assigned: Unassigned » mellow7

hi!

sorry if have no idea about the error. drupal_get_path_alias is still a defined function in drupals api version 5.0 > (includes/path.inc). i searched the forum for similar cases but i only found an older entry http://drupal.org/node/82853. Do you have installed some kinds of cache modules?

brianestadt’s picture

Category: support » bug
Priority: Critical » Normal

I experienced the same problem today ... well, sort of.

I took my redesigned & upgraded (from 4.7 to 5.6) site live today. I encountered no problems on my Mac's Firefox & Safari browsers, but on my wife's Macbook, attempts to load the page in Safari got the same fatal error referencing line 85 of this module. However, Firefox on her Macbook loaded the page without a problem.

Since my site is low-volume and isn't the sort that attracts a lot of attention from refer sites, I chose to disable the module.

deekayen’s picture

Status: Active » Postponed (maintainer needs more info)

Please give this .module file a try and report back: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/framepreven...

The Drupal bootstraping process loads files and modules as they're needed in the execution. hook_init(), what it has been using, is one of the earliest functions to get called, and therefore aliasing functions aren't loaded yet. The OS and browser type probably have little to do with it and is more likely a result of what was cached on the server end for the particular session you had in each. Version 1.6.2.1 moves the checks later in the Drupal execution, which has its benefits and downfalls, but not having fatal errors is a significant weight on the benefits end.

deatech’s picture

I just found the same problem on a site I have under development, but apparently it has been broken for several days without me noticing. While I was logged in (as the administrator), everything worked fine, but once I was no longer logged in, the site was broken with the same error given above. When I did a search for the problem, among google's responses was the site I was working on! Apparently while I was using it administratively without problems (never having been logged out while this module was active), outside browsers which weren't logged in would get the error.

I tried your fix posted in comment #3, and it appears to have cured the problem at least for me.

Thanks!

deekayen’s picture

Assigned: mellow7 » Unassigned
Status: Postponed (maintainer needs more info) » Fixed

Marking fixed for moving hook_init() stuff to hook_menu() for Drupal 5. I re-added it to the init hook for Drupal 6 since it just won't get executed in a D6 page load.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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