While trying to access the operation 'edit' for a Content Type, the interface of the page is dropped back to some basic text.
(I cannot say technically what is happening but the actual theme disappears, just simple text is visible, but does not offer any editing option any more).
As this module is based (or uses) token, I also cannot say if token is the problem or this module.
Both work indipendently, but not togehther.
So the ->edit 'Content Type' is possible without the token module installed but the auto nodetitle installed.
And the ->edit 'Content Type' is possible without the auto nodetitle module installed but the token module installed.
And of course without any of them installed.
Thank your for some advice.
Werner
Comment | File | Size | Author |
---|---|---|---|
#27 | auto_nodetitle-1391706-memory-exhausted-with-token-module-27.patch | 405 bytes | johnnybgoode |
#16 | auto_nodetitle.patch | 527 bytes | pico34 |
auto_nodetitle.jpg | 43.48 KB | yamaciller |
Comments
Comment #1
skriptble CreditAttribution: skriptble commentedI'm having the exact same issue and it seems to have come from no where. I'm trying to trace my steps back. But your solutions of disabling automatic nodetitles and tokens works for me as well. Unfortunately I need both of them for the project I'm working on.
Comment #2
skriptble CreditAttribution: skriptble commentedI increased the memory limit from 128MB to 512MB in hope of fixing another problem with a module on my dev site and all of the sudden the whole pages started loading again. It still takes way too long for the pages to load, but at least the edit pages are loading again.
Comment #3
hansfn CreditAttribution: hansfn commentedThis is a truly critical, or really fatal, issue.
There must be a memory leak some where. Is auto_nodetitle using the Token module in an in appropriate way? I tried increasing memory to 256MB and it wasn't enough: "PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 33742306 bytes)".
I would be more than happy to debug this, but don't know where to start.
Comment #4
hansfn CreditAttribution: hansfn commentedJust trying to make the title clearer.
Comment #5
jesss CreditAttribution: jesss commentedI just ran into this issue and I'm pretty sure it boiled down to a fight between Token and Entity Tokens. Installing the Token Tweaks module and limiting the recursion to 2 solved it.
Comment #6
valthebaldI'm pretty sure the issue is caused by the following code (lines 181-187 in auto_nodetitle.module)
No idea though how to fix it (except use token tweaks, which can be a nice ad hoc solution)
Comment #7
ricksta CreditAttribution: ricksta commentedI'm struggling with the automatic node titles module also.
What happens if you just comment out the code? Curious...have you tried that?
Comment #8
ricksta CreditAttribution: ricksta commentedawesome! token tweaks does the trick. thanks for the tip. fixed me right up.
Comment #9
mamanerd CreditAttribution: mamanerd commentedToken Tweaks module worked for me too, thanks @jesss! Just in case anyone is wondering how to configure Token Tweaks settings, go here after enabling the module:
admin/config/system/tokens
Comment #10
P3t3r CreditAttribution: P3t3r commentedSo, any lookout for a fix in the module?
Comment #11
mautumn CreditAttribution: mautumn commentedThanks @jesss - Token Tweaks - set at a maximum dept of 2 - worked for me also (neither 4 nor 3 worked - probably exceeding a php timeout?). This saved my bacon but I'm concerned for the lack of depth in tokens. It would be great if this could be fixed. We never had this problem in D6 - I wonder if the number and/or depth of tokens have spiralled in D7?
Thanks for sharing.
Comment #12
capellicI was having this problem, too. Not only did it start causing memory exhausted errors out of nowhere, it generally caused performance to be terrible-- taking 8 seconds to load forms. I had thought it was CKEditor because that's above the fold on my forms. It would take forever to load. I discovered it was waiting on the complete token tree to load and then the JS for the tree had to parse to then collapse.
Thanks for the tip to use Token Tweaks-- a real life saver. Works great on a site with 128 MB allocated to memory.
Comment #13
pico34 CreditAttribution: pico34 commentedThanks @jesss ! Token_tweaks module is very useful to speed up the node-type page !
Comment #14
bendev CreditAttribution: bendev commentedHello,
I had the same issue with reference token with automatic node title.
Thanks for the suggestion to use token_tweaks. It solved the issue
Comment #15
capellicNote that Token Tweaks may no longer be needed in newer versions of Token (7.x-1.2). I don't know the status of 6.x.
The token tree is loaded via AJAX on demand.
http://drupal.org/node/1684984
Comment #16
pico34 CreditAttribution: pico34 commentedYou are right @capellic !
With the following patch, token_tweaks becomes useless
Comment #17
brulain CreditAttribution: brulain commented+ 1
This patch works fine, but nodes token are no more available.
Do you know why ?
Comment #18
pico34 CreditAttribution: pico34 commentedCheck if you have the last release of token module
Comment #19
brulain CreditAttribution: brulain commentedNo, this is not (1.3).
I have just updated in 1.4, and I see no changes.
Comment #20
dadderley CreditAttribution: dadderley commented@jesss Thanks for the tip
I am using these:
I have a lot of content types and a lot of fields.
When I installed Automatic Nodetitles 7.x-1.0, it started to take a while to load the main page for the individual content type pages (because it had to load all the darned token trees). I added more fields and content types, eventually I started getting out of memory errors.
I installed the Token Tweaks module and set the Maximum depth limit for the token UI to 2. Now everything works like a charm now.
It would be nice if the Automatic Nodetitles module was fixed as this is a real weakness in it.
But this is a good workaround.
This problem only really exists while doing development.
It shouldn't be a problem on a finished site.
I have the PHP memory limit on my server set really high.
I might try lowering it now to see what happens.
Comment #21
pico34 CreditAttribution: pico34 commentedSame problem for me, (i'm in D6) nodes token are no more available with the patch (#16) (well, nodes token replace continues to work on node creation)
Comment #22
geraldito CreditAttribution: geraldito commentedAs outlined by @capellic, Token Tweaks is no longer be needed in newer versions (since this patch: http://drupal.org/node/1684984) of Token. To load tokens with AJAX on demand change line 184 at auto_nodetitle.module from:
'#theme' => 'token_tree'
to
'#theme' => 'token_tree_link'
Tested with Token 7.x-1.4 and Automatic Nodetitle 7.x-1.0.
Comment #23
presleyd CreditAttribution: presleyd commentedSwitching to the link is great but I also don't see node tokens. Just date, page, user, random and site info tokens in the modal.
Comment #24
presleyd CreditAttribution: presleyd commentedThe token_tree_link theme doesn't take the same options as token_tree did. You can still use the token_tree theme and add an option for dialog.
Adding the options for dialog does the same thing but passes in the correct token_types options. The downside of this is that without token tweaks the page still has memory issues upon opening the modal. The edit page opens nice and quick though if you don't need to see the tokens though!
Comment #25
rodtatham CreditAttribution: rodtatham commented@dougzilla, like you my site had a lot of fields, & visiting the edit screen for any Content Type exhausted the server's memory allocation. The problem: lots of fields + Automatic Nodetitles + Tokens was proving too much work for the server, but:-
allowed me to successfully reduce the server's memory_limit setting in php.ini to a sane setting again (memory_limit = 256M is now fine).
Thanks to this thread for putting me on the right track!
Comment #26
rooby CreditAttribution: rooby commented+1 for #25 as a temporary solution. Not a great solution but a viable workaround.
This really isn't an autonodetitle problem (there is nothing wrong with the auto nodetitle token usage), it is a token module problem, and if you are using entity tokens, it is possibly also an entity token module problem.
This is really a duplicate of these issues:
#1058912: Prevent recursive tokens
#1203018: Memory timeout with entity tokens and token module
Comment #27
johnnybgoode CreditAttribution: johnnybgoode commentedRooby, please don't be so quick to dismiss issues. As pico34, geraldito and presleyd have stated above, this issue can in fact be fixed within auto_nodetitle since token-7.x-1.2. There is already a patch in #16, and I'm attaching a patch with with presleyd's alternate suggestion from #24. Let's get one of these committed so that token_tweaks is no longer necessary just to load the content type edit page (although it may still be necessary to view the token browser).
Comment #28
rooby CreditAttribution: rooby commentedSure that makes sense.
It's a helpful interim work around for using the pages in question, although it doesn't fix the underlying problem.
Comment #29
Elijah Lynn#27 works, and now a token link that when clicked shows a dialog with the missing 'node' tokens and all the other crap that is slowing tokens down. Yeah there is an underlying performance issue with tokens but this patch needs to get in to make forms load at a normal speed.
Comment #30
Elijah LynnComment #31
Elijah LynnAs rooby says, the issue is actually Entity tokens.
Also...
Dave Reid says in https://www.drupal.org/node/1203018#comment-4957036,
and then suggests a solution in #1229568: Token UI 2.0...
and then there is this patch for Drupal 8 that I haven't reviewed yet.. #514990: Add a UI for browsing tokens
Comment #32
Elijah LynnComment #33
vivdrupal CreditAttribution: vivdrupal commentedThis works for me perfectly Token Tweaks - tweaking the depth to 2.
Had been trying to solve it for months ! Thanks.
Comment #34
Anonymous (not verified) CreditAttribution: Anonymous commentedFor those not wanting to have to change community code directly for VCS; you can just set the auto_nodetitle module weight to be lighter than a module you create a hook_form_FORM_ID_alter for:
// if there is an auto_nodetitle form to edit
if (isset($form['auto_nodetitle']['token_help'])) {
$form['auto_nodetitle']['token_help']['#dialog'] = TRUE;
}
Obviously just based on the patch from above.
Comment #35
aksdax CreditAttribution: aksdax commentedToken Tweaks for the win :)
Thanks for the tip.
Comment #36
rooby CreditAttribution: rooby commentedToken tweaks for the workaround. I wouldn't call it a win :)
Comment #37
MustangGB CreditAttribution: MustangGB commented#27 is working as a work-around for me until Token/Entity decide how to do this nicely (hint: AJAX would be pretty sexy).
Comment #38
ilami CreditAttribution: ilami commentedThanks!!!
Comment #39
MarleneSSI CreditAttribution: MarleneSSI commentedJust in case some people are suffering from the same problem and don't want to disable Entity token, i found in my setting.php this line of code (and i don't know who put it there :/)
ini_set('memory_limit', '256M');
i just commented it and the problem is solved.Comment #40
rooby CreditAttribution: rooby commented@MarleneSSI:
I recommend being cautious when changing web server configuration if you are not familiar with the possible consequences.
By changing the PHP memory limit you could potentially negatively affect the performance/scalability/reliability of your website.
Often (not always) you will find that settings like that have been configured a certain way for a reason.
Comment #41
bradallenfisher CreditAttribution: bradallenfisher commentedwow token tweaks works like a charm. Thanks!
Comment #42
jenlampton+1 on RTBC.
Comment #43
Road Kill CreditAttribution: Road Kill commentedToken Tweaks worked for me.
Comment #44
leymannxAfter all the years #5 still valid: https://www.drupal.org/project/token_tweaks
Comment #45
gaurav.kapoor CreditAttribution: gaurav.kapoor commentedI didn't get any kind of timeout error when accessing the content type edit page. Let me know if anybody is still facing this issue.
Comment #47
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commentedComment #48
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commentedPushed #27 for the time being as many have faced issues because of it, Although I wasn't able to reproduce the issue. Please create new issues in case you find any other bugs in this module.
Comment #50
AswathyAjish CreditAttribution: AswathyAjish commentedMe also had the same problem.
Now I upgraded the module from 7.x-1.0 to 7.x-2.0-alpha1 version. Now the add and edit content type page is loading. But for the "Automatic title generation", the tokens are not loading.
For that, I installed the module "Token tweaks" and set the depth to 2. Now the tokens are also loading.
Thanks for the solution.
Comment #51
parth.kukadiya CreditAttribution: parth.kukadiya as a volunteer commentedtoken_tweak module and its configuration worked for me.
Comment #52
Titus Rukenya CreditAttribution: Titus Rukenya as a volunteer commentedHow do we solve this problem in drupal 8?