[support] drupal_get_path not found/working

Cog Rusty cog.rusty at gmail.com
Wed Aug 22 22:54:00 UTC 2007


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 for any help you can provide.
>
> - jody
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list