Hi folks,

When I create a node, there is a collapsed fieldset titled "Placeholder tokens", it lists all the token word available. How can I keep this from appearing in my node submission form, but still keep the TOKEN module enabled?

Comments

tj2653’s picture

I'm interested in this as well.

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

What other modules do you use? This fieldset doesn't come from the token module. My guess is that it's from pagetitle but I'm not sure.

tj2653’s picture

Hi,

I actually found out in my case that there was a setting in one of my modules (Links I believe) to not display the Tokens.

Thanks.

greggles’s picture

Status: Postponed (maintainer needs more info) » Fixed

great.

Zoologico’s picture

I do not use page titles so it isn't from that.

Is there a way to do a text listing of all the modules installed?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

doublejosh’s picture

Status: Closed (fixed) » Active

This is definitely a problem!

I have the same issue with profiles.

doublejosh’s picture

Remove: "Allow user entered tokens"

greggles’s picture

Status: Active » Fixed

It is a problem with some _other_ module on your site, not with the token module. I suggest you look at your admin/build/modules page for modules which depend on token and then try disabling them one-by-one until this fieldset goes away. Then you will find which module is adding this information.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

oash’s picture

This is because of the link module.
To fix the problem, open the link.module and comment the following code

// Add token module replacements if available
// if (module_exists('token') && $field['enable_tokens']) {
// $tokens_form = array(
// '#type' => 'fieldset',
// '#collapsible' => TRUE,
// '#collapsed' => TRUE,
// '#title' => t('Placeholder tokens'),
// '#description' => t("The following placeholder tokens can be used in both titles and URLs. When used in a URL or title, they will be replaced with the appropriate values."),
// '#weight' => 2,
// );
// $tokens_form['help'] = array(
// '#value' => theme('token_help', 'node'),
// );
// }

greggles’s picture

Project: Token » Link
Version: 5.x-1.9 » 6.x-2.5
Status: Closed (fixed) » Active

Aha - thanks for the research!

chadchandler’s picture

Comment #11 works great. Thanks!

quicksketch’s picture

Sigh. DON'T HACK MODULES!

Instead, create a custom module that contains a hook_form_alter() like this:

function mycustommodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'something') {
    // Modify whatever form.
    unset($form['field_link']['token_help']);
  }
}

This code doesn't work as-is. It needs to be updated with the form name and field name. This is the Drupal 6 syntax, which has changed since Drupal 5.

doublejosh’s picture

Just use the feature giving you a checkbox to disallow token input from users for that field. Tokens are great. Don't strip them out, just check the not here box for each field you make... case by case.

gábor hojtsy’s picture

Status: Active » Fixed

From #15, sounds like this is a token module feature already. Marking fixed then.

greggles’s picture

For the record - it's not a token module feature. It's up to link module whether or not to show this help text.

Status: Fixed » Closed (fixed)

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