Would you consider this?
It sets a code based limit that allows users to disable or reduce the recursion limit of the token help tree.
We have already set the limit to 3 globally for token trees, which is the default now, see #1271966: Consider decreasing the default tree depth from 4 to 3, but this still generates a 2MB Token help tree since we have 50 content types and 100's of fields. So the result is terrible performance on the display settings page, two to three time out javascript alerts per settings edit.
This is the reason that I have marked this as a bug rather than a feature request.
If #1555856: File Token support, gets committed, this will need re-rolling to insert the file token.
Cheers
Comment | File | Size | Author |
---|---|---|---|
#8 | colorbox-token_modal_dialog-1560086.patch | 1.03 KB | AaronBauman |
#3 | colorbox-token_limits_1.patch | 959 bytes | frjo |
#2 | color-box-unresponsive-message.gif | 21.51 KB | Alan D. |
#1 | colorbox-token_limits.patch | 1.38 KB | Alan D. |
Comments
Comment #1
Alan D. CreditAttribution: Alan D. commentedNote that this is a code only solution, no UI to confuse users :)
Comment #2
Alan D. CreditAttribution: Alan D. commentedTrying to tempt you for following up.
AJAX post is 5.5 MB for the display settings and using FF I get this alert between 3 and 5 times with 4 to 6 second delays in-between. During the time from when the AJAX request is received and the final alert, the browser window is completely frozen.
Comment #3
frjo CreditAttribution: frjo commentedCan you test this patch? It's only minor changes I believe.
Comment #4
frjo CreditAttribution: frjo commented@Alan D, if you can test my patch and confirm that it works I will commit it right away.
Comment #5
Alan D. CreditAttribution: Alan D. commentedsorry, missed this.
We have been running with this for a while now, and no issues. Then again, we have completely themed the token tree to only show in a popup. Webform 4.x was the last straw. It had 3 themed token trees on the page and rendering these was a real nightmare.
I wish we didn't need Entity Tokens .....
To be compatible with Token tweaks maybe this?
Comment #6
frjo CreditAttribution: frjo commentedCommitted to 7-dev. Thanks for the patch!
Comment #8
AaronBaumanI'm re-opening an old issue because as of Token 7.x-1.3, token supports a modal dialog for the token list, rather than loading everything inline.
Is this a more appropriate solution to the same problem?
see #1684984: Support opening token browser in a jQuery UI dialog on demand
Comment #9
Jorrit CreditAttribution: Jorrit commentedPatch #8 works fine, thanks.
Comment #10
frjo CreditAttribution: frjo commentedI have committed token dialog support but I did not remove the support for recursion limit. The need for it may be less with the dialog support but no harm in keeping it for does who need it.
Comment #12
FiNeX CreditAttribution: FiNeX commented@frjo: in which branch did you committed the patch? I've tested both 1.x-dev and 2.x-dev but the dialog support is not available (I've had to manually patch latest 1.x-dev version).
Comment #13
frjo CreditAttribution: frjo commented@FiNeX: It was only committed to 7.x-2.x but now I have committed it to 7.x-1.x as well. Thanks for the heads up.
Comment #14
FiNeX CreditAttribution: FiNeX commentedThanks frjo :-)