Needs work
Project:
Real Name
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Dec 2011 at 18:18 UTC
Updated:
20 Jan 2021 at 09:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidI'm not quite sure what you mean?
Comment #2
bulldozer2003I've done some more testing and found that this only occurs when I use specific tokens in RealName.
I have some user fields being set by CAS Attributes, if I use those fields in RealName "[user:field_givenname] [user:field_surname]", I get a PHP memory exhaustion error referencing line 818 of token/token.tokens.inc.
If I use any other token in RealName, [user:cas:ldap:sn], [user:mail], [user:uid] it works without errors.
CAS Attributes simply sets the field on user login then ignores it. The field data is a string in the database, so don't think the issue is coming from there.
I will however, post an issue there and come back here with what they say.
Comment #3
bulldozer2003I've found this does not involve CAS Attributes.
I created a new user profile field, field_test. I then set RealName to use [user:field_test].
When viewing any page that displays MY user name I get the PHP memory exhaustion errror.
I can, however, view other pages that show other user's names. The problem seems limited to viewing your own user name when using a token referencing a custom-added field in your profile.
I can set RealName to use many other tokens and still work, including [user:mail], [user:uid], [user:cas:ldap:givenname], even [user:edit]
Comment #4
bulldozer2003I am running the latest dev versions of token and realname, the newest token dev release did not help.
I may have jumped the gun in associating this with the bug in Token, but it really seems to fit.
Any tips on where to start troubleshooting this would be appreciated.
:sad panda:
Comment #5
robwithhair commentedI have hit a recursive real names token bug too, and I have followed advice and installed the token_tweaks module. Originally I posted this issue on the OG module issue list http://drupal.org/node/1440284 and have found it may be token and real name related. Can anyone give me any advice? I have attached the error message. At the end of my tether with this bug.
Comment #6
robwithhair commentedThis seems to be a real name module issue. More testing is required on my part tomorrow but I will endeavour to get to the bottom of it if possible and will post my findings. Please advise if you think this should be a separate bug report or if you think this is the right place.
Comment #7
robwithhair commentedI can confirm this is still an issue in the recent dev.
Comment #8
robwithhair commentedYep, after whole day of testing I can confirm that realname is this module causing the issue in my case. Everything fine without module but I can't find the offending code, I'm afraid someone with a bit more knowledge of how all these modules fit together might be required to find a solution.
Comment #9
Anonymous (not verified) commentedI also have this problem. I only get memory exhaustion when trying to register new user. I have 1 additional user field: field_name. When I disable RealName, I can register again.
Comment #10
robwithhair commentedIs anyone working on this issue at the moment. Because it spans a few modules it's a tricky one and beyond my own experience with token module. I'd imagine it's a difficult one to recreate though so let me know if I can help with testing in any way.
Comment #11
bulldozer2003I am still avoiding it by using user entity field tokens rather than the cas attributes tokens I was using. I wrote a module to take the cas attributes and write them into the user entity fields.
Try using different tokens. Perhaps add field(s) to the user entity, populate them (manually or with a custom module), then use the appropriate token for those fields.
Comment #12
Traverus commentedJust to provide some more input. I hit a recursion error when
If I changed the tokens to "[user:field-last-name], [user:field-first-name]" instead, there were no issues.
Comment #13
rolando.alevelbeyond commentedI experienced exactly what traverus is saying..
i had realname configured to: [user:field_dev_name] it worked at first, but after a while every user that wasn't an admin would be getting a 500 server error when they tried to login... couldn't login at all.. but funny though the #1 user (admin) didn't have this issue..
Now i use: [user:field-dev-name] and it's been working well..
not sure if this is a bug with token or realname.. but here's the fix if anyone is experiencing the same troubles Traverus and myself experienced..
Comment #14
ezra-g commentedI'm unable to reproduce this problem with the latest 7.x-1.x branch of Realname. I cross-posted my attempted reproduction steps at http://drupal.org/node/1341868#comment-6374802 .
Comment #15
Anonymous (not verified) commentedI have fields field_firstname and field_lastname. On RealName settings I had chosen tokens [user:field_firstname] and [user:field_lastname] and got out of memory. Token list also shows tokens [user:field-firstname] and [user:field-lastname] (notice hyphen instead of underscore). Tried these and now everything works even without any patches or workarounds.
So I can confirm #12 and #13
Comment #16
mattwmc commentedDitto.
The [user:name] token cannot be used as it will cause recursion.Comment #17
phizes commentedWith regards to comment #15, I can concur that this works. I _think_ that the token with the dash is provided by the entity_token module, and does not suffer from the issue which the token module has. entity_token is provided with the entity module.
Comment #18
spadxiii commentedRegarding #16: this looks like it's fixed in latest version (7.x-1.2)
I just installed the module and set up a nice tokened-string (which was wrong, bug in token?) and when I save the admin form, there is an unending recursive loop:
* realname_load_multiple tries to load the realnames
* it doesn't find the realnames so it does a realname_update
* which loads the tokens, which needs a user object so it does a user_load
* this triggers a realname_user_load which does a realname_load_multiple
* etc
I fixed this (also in attached patch):
In the `realname_settings_form` function, the token_tree is loaded with the option '#dialog' => TRUE. This appears to be a bug in token (??) as this loads the wrong token-list: I get a big list of [current-date:*], [current-user:*], [current-node:*], etc. tokens.
If I remove this option, I get a nice token-list with just the [user:*] tokens.
Comment #19
tessa bakkerWorks great, please commit.
Comment #20
hass commentedPlease add a test that verify functionality. What other modules have added this bandaid?
Comment #21
hass commentedIs this still an issue? I have read Dave has added a protection years ago...
Comment #22
nikus85 commentedThere still is issue: just installed RealName module, played a bit with settings of 1 menu item, logged out/in couple times, cleared cache, and... got my site down with Memory limit / Bad gateway error! Urrrr.....
Thank You topicstarter for patch #1 - I recovered the site in just 20-30 minutes after I tried to do many things with other modules, too, and found out this thread. Very nice solution.
Comment #23
hass commentedCan you share a repro plan, please?
Comment #24
gumrol commentedThanks for the Patch - it worked for me on version 7.x.1.3
I could not batch delete users with Drush (delete_all module) or view the user admin screen if specific users were loaded in the 50 of the first page. The web pages just timed out and drush delete would bring the webserver down!
After looking all over for fixes I found this post and adding the patch sorted it out!
Comment #25
donaldp commentedThis still seems to be an issue. The code in the patch fixed a problem I was having with a number of drush problems (drush uli causing a Segment fault and core dump) for example.
Login in to the site also failed with a stack limit exceeded.
Comment #26
donaldp commentedHere's a new patch for the 7.x-1.4 branch as the location has changed.