- Issue created by @dieterholvoet
- Merge request !20Issue #3391571: 'Browse available tokens' link does not work β (Merged) created by dieterholvoet
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 9:31am 4 October 2023 - Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - πΊπΈUnited States zengenuity
I understand the issue here, but I'm not sure this is a universal problem. I think it could be dependent on your particular site configuration. I tested this on a couple of production sites where I have Easy Email running, and the token popup was fine. It loaded somewhat slowly but in a reasonable time.
The reason I extended the recursion_limit is that the nature of the email templates is that you're often going to need to access an entity reference field on the email entity, then down to the entity, then let's say you have another field on that entity, you can't go any further. Specifically, I've been using this for Commece order email receipts, and if the recursion limit is 3, you can get anything beyond the order level field data. That's probably good enough for many things, but not necessarily all.
I'm not sure I want to globally change this at this point. If there's an easy way to make it configurable somehow, I would definitely be open to that, though I'm not sure where we'd put it. We don't have a global settings page currently.
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - π§πͺBelgium dieterholvoet Brussels
I tested this on a couple of production sites where I have Easy Email running, and the token popup was fine. It loaded somewhat slowly but in a reasonable time.
If it's already loading slowly for you, all you need is a couple more modules providing global tokens (we have ECK Site Settings β for example) and maybe slightly different PHP timeout settings to make it break. I understand it's more useful to have deeper token depth for some users, but if it means other users can't use tokens at all I'm not sure it's worth it.
I may have found a good solution. I added a form element to both forms, allowing the user to override the tree depth. What do you think?
- Status changed to Needs work
over 1 year ago 4:41pm 20 December 2023 - πΊπΈUnited States zengenuity
Yes, this solution is good. However, it doesn't work when I first load the form. If I click Browse Available Tokens right after loading the form, it seems like token depth is 1. If I change the depth value, it works after that, and the depth is correct. Can you check the initial loading issue?
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 7:01pm 20 December 2023 - Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass -
zengenuity β
committed f11f4562 on 2.1.x authored by
DieterHolvoet β
Issue #3391571 by DieterHolvoet: 'Browse available tokens' link does not...
-
zengenuity β
committed f11f4562 on 2.1.x authored by
DieterHolvoet β
- Status changed to Fixed
over 1 year ago 9:13pm 20 December 2023 - πΊπΈUnited States zengenuity
This looks good. I updated the default depth to 4 for both forms, and I reworded the help text to make it a bit more clear what adjusting this value will do. Then I merged the MR.
Thanks for your work on this!
Automatically closed - issue fixed for 2 weeks with no activity.