Hello,
I'm running a test site with Drupal 5. I cannot enable the token module on the module page. What am I doing wrong?

Thanks,
Sean

Comments

kwai6969@gmail.com’s picture

I'm having what may be the same problem. It's giving me errors

* warning: main(token_node.inc): failed to open stream: No such file or directory in /home/dyates/public_html/modules/added_modules/token/token.module on line 4.
* warning: main(): Failed opening 'token_node.inc' for inclusion (include_path='') in /home/dyates/public_html/modules/added_modules/token/token.module on line 4.
* warning: main(token_user.inc): failed to open stream: No such file or directory in /home/dyates/public_html/modules/added_modules/token/token.module on line 5.
* warning: main(): Failed opening 'token_user.inc' for inclusion (include_path='') in /home/dyates/public_html/modules/added_modules/token/token.module on line 5.

The files are all there:
-rw-r--r-- 1 dyates users 4550 Jan 17 08:39 API.txt
-rw-r--r-- 1 dyates users 14940 Apr 23 2006 LICENSE.txt
-rw-r--r-- 1 dyates users 560 Dec 30 17:41 README.txt
-rw-r--r-- 1 dyates users 281 Jan 17 08:50 token.info
-rw-r--r-- 1 dyates users 7496 Jan 11 09:35 token.module
-rw-r--r-- 1 dyates users 6993 Jan 17 03:59 token_node.inc
-rw-r--r-- 1 dyates users 1497 Jan 11 09:35 token_user.inc

any ideas?

thanks!

kwai6969@gmail.com’s picture

Fixed it... change the include lines of the token.module file to

$tokenpath = drupal_get_path('module', 'token');
include_once("$tokenpath/token_node.inc");
include_once("$tokenpath/token_user.inc");

copied from the views module... previously the include_once didn't include the path.

eaton’s picture

Status: Active » Fixed

The latest dev build of token.module now includes this change. It will be rolled into version 1.5 once it's released. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)
JonSTeps’s picture

Version: 5.x-1.4 » 5.x-1.8
Assigned: Unassigned » JonSTeps
Status: Closed (fixed) » Active

I'm having this same issue, with token 5.x-1.8 and with 5.x-1.x-dev. I added the token module to my module directory, i enable it under admin/build/modules, updated php, but when i go to my admin page there's nothing for token. Its still checked enabled under admin/build/modules but isn't anywhere else.

I tried editing the include lines like kwai6969 said to do, but that didn't do anything either.

I'm running drupal 5.1, with a heavy assortment of modules. Any ideas?

greggles’s picture

Status: Active » Fixed

You said "when i go to my admin page there's nothing for token"

Well, there's not supposed to be anything ;)

You only need token if another module has requested it. And in that case, test that other module to see if it works properly. If so, token is working. If not - file a separate issue for that specific problem.

JonSTeps’s picture

I feel really silly now, thanks for the help greggles. everything worked out

Anonymous’s picture

Status: Fixed » Closed (fixed)
butler’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

I continue to experience the inability to enable this module due to uncheckable checkbox...

I have tried :

token-5.x-1.8
token-5.x-1.x-dev

from:

http://ftp.drupal.org/files/projects/

If I'm not mistaken, one of those should incorporate the fix referred to in comment #3 on pg /node/115664-"latest dev build of token.module now includes this change" which caused this issue to be closed. The lines:

$tokenpath = drupal_get_path('module', 'token');
include_once("$tokenpath/token_node.inc");
include_once("$tokenpath/token_user.inc");

... are to be found paraphrased in token.inc which is required once as opposed to included in token.module. Anyone have any ideas why this is still a bug for me?

Thanks...

greggles’s picture

I believe that what happens is this:

The way that the admin/build/modules page handles keeping the dependency is to check for the token module being enabled *when* pathauto is enabled and then disabling the checkbox ever after that. However, if you upgrade the files for a module (like pathauto) that is already enabled then this dependency check is bypassed, but the token checkbox is still disabled.

The solution is to disable pathauto, enable token, and then re-enable pathauto. And yes, to fix that segmentation fault use the current 5.x-1.x-dev which will become 5.x-1.9.

Thanks.

greggles’s picture

Assigned: JonSTeps » greggles
Status: Postponed (maintainer needs more info) » Fixed

no response, assumed to be fixed.

greggles’s picture

Assigned: greggles » Unassigned
Anonymous’s picture

Status: Fixed » Closed (fixed)

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