Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
On a vanilla drupal set up I created some tokens through hook_tokens which returns an array of $replacements.
If one of these replacement values exceeds 258 characters non of the subsequent tokens will be rendered at all (not even the original token).
This test was done under a single "$type", so for example to replicate create two tokens:
[path:test1]
[path:test2]
Make the replacement of test1 more than 258 characters and put the next token below - it will never get rendered.
Comments
Comment #1
Dave ReidCan you paste more of your actual code? I highly doubt that we cannot have replacement values more than 258 characters. Where are you using the tokens may also matter (in the UI), so could you detail where?
Comment #2
ferahl CreditAttribution: ferahl commentedHi,
I just set up another vanilla installation and traced this issue to the Token Filter module http://drupal.org/project/token_filter
So apologies I'll close this and move the bug report over to there.
To clarify (and tested and confirmed): If you use that module to create a Text Format with token replace, if the tokens (at least under a single type) exceed 282 characters that token and any below that token in the array will not display.
Comment #2.0
ferahl CreditAttribution: ferahl commentedMore descriptive of steps to replicate