Call to undefined function drupal_get_path() - taxonomy_vtn.module 5.x-1.x-dev

vpiotr - May 22, 2008 - 20:37
Project:Taxonomy VTN
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:active
Description

I have prepared version for Drupal 5.x.
See attached file. Please upload in appropriate format.

AttachmentSize
taxonomy_vtn-5.x-1.x-dev.zip57.56 KB

#1

vpiotr - May 22, 2008 - 20:48

Note: only main module is modified / tested. Status of "taxonomy_vtn_blocks" sub-module is unknown.

#2

tomaszx - May 22, 2008 - 22:02

Hi,

thanks, i submit your code to dev branch.

#3

tomaszx - May 22, 2008 - 22:02
Version:6.x-1.0-rc2» 5.x-1.x-dev

#4

Fuzzytek - June 3, 2008 - 14:09

There is a small error in the file taxonomy_vtn.info
When I open up the Module activation screen the module reads
Depends on: Array (missing)

Change line
dependencies[] = taxonomy
to
dependencies = taxonomy

Results in the Module activation screen saying
Depends on: Taxonomy (enabled)

#5

tomaszx - June 3, 2008 - 20:54

just see dev release not here, but here: http://drupal.org/node/261703

there and here is:

; $Id: taxonomy_vtn.info,v 1.1.2.1 2008/04/22 23:49:05 tomaszx Exp $
name = Taxonomy VTN
description = "Taxonomy VTN - vocabularies, terms and nodes"
package = Taxonomy VTN
dependencies = "taxonomy"
core = 5.x

without array.

#6

zeezhao - June 14, 2008 - 10:23

great work. subscribing. thanks

#7

zeezhao - June 15, 2008 - 17:15
Title:Version for Drupal 5 - prepared» Call to undefined function drupal_get_path() - taxonomy_vtn.module 5.x-1.x-dev

I have been getting this error intermittently:

Fatal error: Call to undefined function drupal_get_path() in ...\modules\taxonomy_vtn\taxonomy_vtn.module on line 45

#8

vpiotr - June 16, 2008 - 18:33

This is build-in function (drupal_get_path), verify that you use at least Drupal 4.6

#9

zeezhao - June 17, 2008 - 17:06

Thanks for your reply. I am using drupal 5.7 with MySql 5.0.18 & php 5.1.1, running garland theme.

I noticed that the drupal_get_path() error usually happens when the user is not logged in. So it appears that even though i have set taxonomy_vtn permissions to allow anonymous user to browse, it gives this error... Please do you have any ideas on the best way to fix it?

Fyi - I also get another error when I want to change seetings using: admin/settings/taxonomy_vtn

warning: Invalid argument supplied for foreach() in ....\includes\form.inc on line 949.

#10

vpiotr - June 17, 2008 - 18:07

Sorry, no idea why the first error appears.

The second error I see too, but as far as I know it does not affect the configuration page.
Maybe somebody will try to find what is wrong in it, meanwhile you can use it "as is"...

#11

zeezhao - June 17, 2008 - 22:21

Ok. The thing is that when the "Call to undefined function drupal_get_path()" error happens I can not use the system.... Any link like going to "home" stops working and gives the error. The only way around it at that stage is to go to a link like admin/.... and then try and re-log into drupal.

#12

zeezhao - June 18, 2008 - 06:38

It appears that I have fixed the bug by putting this condition in function taxonomy_vtn_init() :

if (function_exists('drupal_get_path'))
{
....
}

see these links for similar issues with drupal_get_path:

http://drupal.org/node/200395

http://drupal.org/node/157157

Thanks.

#13

cimazadig - August 27, 2008 - 08:37

I have the same problem. How did you fix it? I try without results.
Thank's
sergio

#14

zeezhao - August 29, 2008 - 15:54

Fix described above worked. See: http://drupal.org/node/261670#comment-886125

#15

cimazadig - August 30, 2008 - 15:45

I read it...but I'm very poor in php...and english too...
In which file I found it:
if (function_exists('drupal_get_path'))
{
....
}
and how did you fill your "...". Could you attach your modified file?
Sorry and thank's a lot.
Sergio

#16

Summit - September 10, 2008 - 14:37

Subscribing, greetings, Martijn

#17

fgiacanelli - October 30, 2008 - 16:22
Category:task» feature request
Priority:normal» critical

Hello,

why in the drupal 5 port the "exclude vocabs" and "exclude terms" form fields have been eliminated?

In the corresponding source code all related code lines have been deleted.

It would be great for me to use VTN on drupal5 *omitting* some taxonomies.

TIA

 
 

Drupal is a registered trademark of Dries Buytaert.