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?

Members fund testing for the Drupal project. Drupal Association Learn more


jmonkfish’s picture

Came 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.

ricksta’s picture

I think you may be right. Perhaps a configuration setting to turn off or limit that aspect of the module would be nice.

jmonkfish’s picture

jmonkfish’s picture

I 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.

mrweiner’s picture

I'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.

ricksta’s picture

token tweaks module fixed my issue. install and set number of levels of tokens and your off!

jmonkfish’s picture

Status: Active » Needs review
872 bytes

#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.

amitgoyal’s picture

Status: Needs review » Reviewed & tested by the community

@jmonkfish - patch looks good to me.

SuperStes’s picture

Thanks 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?

vramiguez’s picture

Issue summary: View changes

Jan_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.

Elijah Lynn’s picture

Status: Reviewed & tested by the community » Needs work

Just 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?

Elijah Lynn’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#1391706: Memory exhausted when editing content type with Token module enabled

Everyone 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.

Elijah Lynn’s picture

Totally 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.


Elijah Lynn’s picture

Irving Jair’s picture

I was having an issue with the tree token and this patch help me a lot.

ccjjmartin’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

I 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.

g33kg1rl’s picture

Patch in #15 works for me. :)

ccjjmartin’s picture

This 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):


It actually searches for any instance of this bug and replaces it.