[support] drupal_get_path not found/working

Jody Cleveland cleveland at winnefox.org
Thu Aug 23 00:42:32 UTC 2007




On 8/22/07 5:54 PM, "Cog Rusty" <cog.rusty at gmail.com> wrote:

> On 8/23/07, Jody Cleveland <cleveland at winnefox.org> wrote:
>> Hello,
>> 
>> I've been running Drupal for quite some time now, and I've always had a
>> problem that I'm finally frustrated enough  to try to fix.
>> 
>> For some reason, my system does not recognize drupal_get_path. I run into
>> errors any time I try to install a module. So, what I end up needing to do
>> is go into the .module file and change anywhere there's drupal_get_path to
>> be the full path to that file it's looking at.
>> 
>> Any ideas how to fix this? Is this a drupal setting, or php?
> 
> 
> Normally drupal_get_path gets the path of an item (module or theme)
> from the 'system' table of the database. The paths stored in the
> 'system' table are filled-in whenever you visit the
> /admin/build/modules or the /admin/build/themes page. So, they are
> easily updated if you move an item.
> 
> It would be interesting to take a look at the 'system' table to see if
> the paths stored there seem right. Look for paths of modules or themes
> which are causing you trouble. If they do seem right (for example
> 'sites/all/modules/nodequeue/smartqueue.module') then the problem
> could be in how the function works in your environment.
> 
> One possible cause of such a problem is a multisite with a shared
> 'system' table where different sites use their own copies of modules
> and themes with the same names, which are located in different paths
> (sites/example.com/modules), and whenever the /admin/build/modules
> page of one site is visited the shared 'system' table is updated
> differently.

Thank you so much for taking the time to help me out with this.

I looked at the system table, and everything seems ok:

themes/engines/phptemplate/phptemplate.engine
themes/garland/page.tpl.php
themes/engines/phptemplate/phptemplate.engine
modules/system/system.module
sites/all/modules/actions/actions.module
sites/all/modules/adminblock/adminblock.module
modules/aggregator/aggregator.module

I also have this issue when trying to install modules that have
drupal_get_path in the .install file. And, they won't install without
putting in the full path. This instance is a multi-site setup. But, I've
also got a sandbox site setup that is not, and it does the same thing. I've
also got a personal account with an outside hosting place. That works just
fine. So, I believe it may be something other than drupal. I'm completely
stumped on this one.

- jody



More information about the support mailing list