Fatal error: Call to undefined function: drupal_get_path() in ...../modules/cck_map/cck_map.module on line 5

I got this error with 3.1 first....then when i viewed as admin..i cld see the full map..but i cldnt see as visitor..even after cck perms adjusted..

then i deleted cache..and then this error sprung up..

Fatal error: Call to undefined function: drupal_get_path() in .../modules/cck_map/cck_map.module on line 5

Then i noticed ur 3.1.1 module..

now..i dont even see a map to edit :(

and also the error is there..
pls advise and help

thanks

Comments

gurukripa’s picture

Title: major error..pls help » cck_map...major error..pls help

there is also some problems with the following link

www.mysite.com/drupal/user
After installing this module cck_map

It gives the same error
Fatal error: Call to undefined function: drupal_get_path() in /hsphere/local/home/abcd/mysite.com/drupal/modules/cck_map/cck_map.module on line 5

gurukripa’s picture

Title: cck_map...major error..pls help » cck_map...affects the user login page

sorry to be posting again..but the problem is serious..

it affects the user login page somehow...

i have 5.1 and even deactivated the module..and moved it out of the modules folder..but still its causing problems..dunno how...

if i try to go to

http://www.mysite.com/drupal/user

then i get this error

Fatal error: Call to undefined function: drupal_get_path() in /hsphere/local/home/abcd/mysite.com/drupal/modules/cck_map/cck_map.module on line 5

beeradb’s picture

gurukripa:
The function that you are getting an error on is a function in the drupal core, you can find the documentation here: http://api.drupal.org/api/function/drupal_get_path/5

If you have disabled the module in your site settings, code from within the .module file should never be executed. My recommendation is that you delete the module altogether. I do not see how this problem could be caused by the cck map module. Have you altered your drupal core in some way?

gurukripa’s picture

i have advanced cache on...on Drupal 5.1

however this problem surfaced only on using cck map...and the error is related to it..

kindly suggest some ways to escape this..particularly serious becoz it affects the user link

thanks

horvathgergely’s picture

Same issue for me. When I enable the module, my site becomes unavailable for anonymous visitors, they can only see the error message. However, if I manage to log in again, as admin I can still see everything.
When I disable it, all's well again. No change in the core files.

beeradb’s picture

Gurukripa:

If that is happening and you believe it to be caused by this module I recommend you completely delete the module from your drupal installation and clear the cache's on your site. After you have done those two things there should be no possible way the module could effect your drupal installation.

Thanks,
Brad

jcastillo’s picture

Title: cck_map...affects the user login page » cck_map...affects the user login page. *Temporary and dirty solution*.

Hello I have the same problem, recieve an error when an anonymous user visit the web with CCK Map module. I have found a quite dirty solution, editing the function cck_map_init in cck_map.module:

Original:

function cck_map_init() {
include_once(drupal_get_path('module', 'cck_map') .'/cck_map.inc');
}

Patched:

function cck_map_init() {
global $user;

if ($user->uid == 0) {
include_once('includes/common.inc');
}

include_once(drupal_get_path('module', 'cck_map') .'/cck_map.inc');
}

Yes, I am embarrassed to myself to make this it dirty patch, but I really need those maps working. Good day friends!.

beeradb’s picture

Status: Active » Fixed

A new release is available, and this issue should be resolved. I am closing this issue, but feel free to reopen it if for some reason you continue to experience this issue.

Thanks for the patience in waiting for this latest release, things have moved rather slow with the holidays and all.

Thanks,
Brad

Anonymous’s picture

Status: Fixed » Closed (fixed)

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