Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have a local D7 site and installed the Automatic Nodetitles module. Every time I went to a content type page, not the manage fields, but the main content type page for either creating a new content type or editing the basic settings for a content type, the page would hang up until I clicked the stop script button in the warning popup. This is the page where you an set your auto nodetitle. I disable the module and now the page loads instantly. What to do....? I really like the module, but, now what?
R
Comment | File | Size | Author |
---|---|---|---|
#7 | auto_nodetitle_with_token_tree_link-1694720-7.patch | 872 bytes | puddyglum |
Comments
Comment #1
puddyglumCame here for the same reason, hoping somebody had a solution. It has to do with the Tokens, I believe. We have many content types and many fields, so the number of Tokens is huge and it causes multiple Unresponsive Script warnings.
Comment #2
ricksta CreditAttribution: ricksta commentedI think you may be right. Perhaps a configuration setting to turn off or limit that aspect of the module would be nice.
Comment #3
puddyglumI believe it's related to #1391706: Memory exhausted when editing content type with Token module enabled
Comment #4
puddyglumI would like to know if it's possible to limit the available node tokens to only fields that are used by the node type being edited. That would solve this problem.
Comment #5
mrweiner CreditAttribution: mrweiner commentedI'm also experiencing this problem. I didn't realize that this module was at fault, but looking back, the error started popping up after its installation. On a couple of occasions, I have gotten a "Fatal Error: Allowed memory size...", and I think it's related to this problem. It got bad enough tonight that I actually had to go into my settings.php and increase my memory limit. Even 92M wasn't enough, so I bumped it up to 160 as to not need to worry about it. This still seems quite high just to mitigate this issue.
I agree that it seems to be related to the page having to load all tokens provided by all fields of all content types. An option limiting the displayed tokens to the current content type, or eliminating the help area altogether, would probably get rid of the issue.
Comment #6
ricksta CreditAttribution: ricksta commentedtoken tweaks module fixed my issue. install and set number of levels of tokens and your off!
Comment #7
puddyglum#1684984: Support opening token browser in a jQuery UI dialog on demand has been committed to 7.x-1.2, which has a new Token Tree configuration which is AJAX based, and doesn't load until a user clicks a link. This would prevent a lot of memory usage and page load time, and also prevent the JS script timeout error from occurring.
Attaching a patch that makes use of it.
If you were already experiencing the Unresponsive script error, now you will get that error only when you click the "Browse available tokens" link, instead of everytime you load the Content Type edit screen.
Comment #8
amitgoyal CreditAttribution: amitgoyal commented@jmonkfish - patch looks good to me.
Comment #9
SuperStes CreditAttribution: SuperStes commentedThanks for the patch! It solves te problem of the long running script that was frustrating me.
I seem to have lost some tokens in the popup list though. I only have the groups: current date, current page, current user, random and site tokens. The field tokens of the node itself are no longer there...
Have I done something wrong or is this something that still needs a bit tweaking?
Comment #10
vramiguez CreditAttribution: vramiguez commentedJan_MSK, you are right, you the node branch is not showing up in the modal window. However, if you want those tokens, you can look for them in: admin/help/token. Using them with the autonode title works.
jmonkfish, thanks for the patch, it is working for me too.
Comment #11
Elijah LynnJust tested this against 7.x-1.0 and for some reason the 'nodes' tokens are missing in the pop up dialog. All the other tokens are there but not the 'nodes' tokens, any ideas?
Comment #12
Elijah LynnEveryone cannot see the 'nodes' with this patch, also the token browser loads crazy fast with this patch, because all the tokens are not loading, just the global ones.
I am closing this since it is a duplicate of. Feel free to reopen if you disagree.
See #1391706: Memory exhausted when editing content type with Token module enabled.
Comment #13
Elijah LynnTotally forgot to mention that there is a patch at #27 in the issue linked above that loads the 'node' tokens. I just marked it as RTBC.
https://www.drupal.org/node/1391706#comment-8976469
Comment #14
Elijah LynnComment #15
Irving Jair CreditAttribution: Irving Jair commentedI was having an issue with the tree token and this patch help me a lot.
Thanks!!!.
https://www.drupal.org/files/auto_nodetitle_with_token_tree_link-1694720...
Comment #16
ccjjmartin CreditAttribution: ccjjmartin as a volunteer commentedI am going to +1 RTBC the patch mentioned in Irving's comment. I also believe that this was closed as duplicate in error. PHP Memory (backend) and Browser Processing (frontend) are separate issues. Forgive me if a similar patch has already been merged.
Comment #17
g33kg1rl CreditAttribution: g33kg1rl commentedPatch in #15 works for me. :)
Comment #18
ccjjmartin CreditAttribution: ccjjmartin as a volunteer commentedThis bug popped up on a few sites and I don't think this will get committed anytime soon, so I created a small module to fix it (display the link instead of all of the tokens):
https://www.drupal.org/project/token_link
It actually searches for any instance of this bug and replaces it.
Comment #19
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commented