When editing a message type after having added an entity reference field of type content, all the site's content fields tokens will become available, even if I selected a specific bundle (node type) in the entity reference field settings.

If your site is complicated (lots of content types and fields) the edit page will become unusable (cause of token module and jquery I think). Even switching the Field language select list will freeze the page (for more than 10 seconds for me!).

If I remove reference fields, of course everything works nice and fast..
Adding more message types will also make the edit page slow (already during creation!), because all other message type fields' tokens will be available!

Is this intended functionality? In that case, why?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kopeboy’s picture

Issue summary: View changes
kopeboy’s picture

Title: Too many tokens! Slow loading of edit page » Too many tokens! Slow loading of message type edit page
joep.hendrix’s picture

Same problem here.
In an Open Atrium solution a space content type has lots of extra fields with a lot of entity reference fields.
Editing the message types is impossible, no response due to the huge amount of tokens.

joep.hendrix’s picture

Title: Too many tokens! Slow loading of message type edit page » Too many tokens! Not able to edit message type
Version: 7.x-1.9 » 7.x-1.x-dev
Priority: Normal » Major
joep.hendrix’s picture

Title: Too many tokens! Not able to edit message type » Too many tokens! Not able to create or edit message type
joep.hendrix’s picture

As a work around I have installed https://www.drupal.org/project/token_tweaks.
Now the maximum depth of the token can be set in order to prevent the load of zillion tokens.
Probably the problem is caused by entity token?
Related issue: https://www.drupal.org/node/1058912

geek-merlin’s picture

Title: Too many tokens! Not able to create or edit message type » Tokens make message type form unusable
Status: Active » Needs review
FileSize
779 bytes

Confiming: This is a real PITA which makes the form unusable on any big site.

Fortunately it has a trivial mitigation.
Patch flying in.

Jorrit’s picture

Status: Needs review » Reviewed & tested by the community

Patch 7 is a good work around. It does not help users that want to select a token but it makes the page accessible.

NWOM’s picture

https://www.drupal.org/project/fast_token_browser is a better workaround than #6 for this issue.

bluegeek9’s picture

Status: Reviewed & tested by the community » Closed (outdated)