The token browser is automatically added to the configuration form of certain system actions, but only during the "add" operation and not on "edit". This makes editing form actions harder than it needs to be and is easily fixed by implementing hook_form_BASE_FORM_ID_alter instead of hook_form_FORM_ID_alter.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ckaotik created an issue. See original summary.

ckaotik’s picture

Assigned: ckaotik » Unassigned
Status: Active » Needs review
FileSize
694 bytes

See the attached patch.

Berdir’s picture

Status: Needs review » Fixed

Thanks, committed.

  • Berdir committed fbaeaf6 on 8.x-1.x authored by ckaotik
    Issue #2868244 by ckaotik: Token Browser does not appear on system...

Status: Fixed » Closed (fixed)

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

LpSolit’s picture

The switch block should be enclosed in

if (isset($form['plugin'])) {
...
}

else the filebrowser module throws:

Undefined index: plugin in token_form_action_form_alter() (line 343 of modules/token/token.module).

With this patch backed out, the filebrowser module doesn't throw such messages, so this problem is new in Token 1.0.

Berdir’s picture

Please create a new issue, with a patch if possible, thanks!