Drupal Association members fund grants that make connections all over the world.
I'm trying to think of why I had 4 set as a default. I think it was for field tokens - [node:field_name:values:0:something] would be 4 levels deep.
Changing the default and making it configurable would be great. Then you have the faster loading in most cases with the ability to put up with slower loading if you really need to get at a deep token.
I'm pretty fuzzy on how tokens work... If you set it to 3 normally, then the admin sets it to 4 to get a deep one in the list, but then sets it back to 3 for normal use, will that deep one be accessible when the token is being used? In other words, does this setting affect only the admin screens or the actual usage as well?
Yeah this would only affect the UI and doesn't affect token replacement at all.
Sounds perfect, then. :)
+1. Setting default tree depth to 3 would correct performance problems for most use cases.
Yes please. That would stop my sites from blowing up.
Depth 4 resulted in multiple thousands of tokens (user with fields -> node with fields -> media gallery with fields -> ... + the current token/entity_tokens issue) on a site here and it killed both the site and the browser when trying to display it.
I guess an optimal solution would be to only display 2 or so and load deeper levels with ajax on the fly :)
I appled the patch and the token browser is still slow but already much better. RTBC.
Agreed this is a reasonable stop-gap for now. Committed #5 to Git. http://drupalcode.org/project/token.git/commit/b6766a3
sweeeet.. trying this now.. this sounds like it should allow the JS to finish loading on most of my admin pages.. :)
hmm.. well not the major improvement i thought it might be.. pages with token browser still need 1 or 2 refreshes to load completely. i set recursion depth to 2 and then i think pages were loading completely.. although maybe sporadic. at 1 it seemed faster and reliable.
but at 1 i still get tokens like this: [user:field-discipline:field_attachments] , so perhaps i don't get what depth is referring to here and i think there are still 1000's of tokens being listed. ajax loading of each category is likely the way to go here..
Automatically closed -- issue fixed for 2 weeks with no activity.
Drupal is a registered trademark of Dries Buytaert.