At URL de/node/2/webform/components/7?destination=node/2/webform in my dblog

Token is installed, but disabled on this site.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Oh geez. This is because module_load_include() will work on disabled modules. We have this code currently:

  // If token supports dialogs, display simply as a link.
  module_load_include('inc', 'token', 'token.pages');
  if (function_exists('token_page_output_tree')) {
    return theme('token_tree', array('token_types' => $groups, 'dialog' => TRUE));
  }

We can fix this simply by adding a module_exists() call first, which oddly will return FALSE if the module exists but is not enabled.

quicksketch’s picture

Status: Active » Fixed
FileSize
475 bytes

This should fix it. Committed to 7.x-4.x.

hass’s picture

ok :-)

Status: Fixed » Closed (fixed)

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

tinkerbelle’s picture

Version: 7.x-4.x-dev » 7.x-4.1
Issue summary: View changes
Status: Closed (fixed) » Active

Hi, I'm still seeing this error in 7.x-4.1... Token module is not installed or present at all, so I'm sorry if this should actually be a separate issue!

Seems to be caused by the code at lines 4031-4034 in webform.module:

  $fieldset['token_tree'] = array(
    '#theme' => 'token_tree',
    '#token_types' => $groups,
  );

  • DanChadwick committed 51627b4 on 7.x-4.x
    Issue #2038141 by DanChadwick: Fixed Warning: Theme hook token_tree not...
  • DanChadwick committed 59f4788 on 8.x-4.x
    Issue #2038141 by DanChadwick: Fixed Warning: Theme hook token_tree not...
DanChadwick’s picture

Version: 7.x-4.1 » 8.x-4.x-dev
Status: Active » Fixed
FileSize
2.58 KB

Right you are. I guess almost everyone has Token installed or isn't noticing the error. I re-factored the function while the hood was up.

Committed to 7.x-4.x and 8.x.

tinkerbelle’s picture

Awesome, cheers!

Status: Fixed » Closed (fixed)

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

DanChadwick’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev