Realname and OG (organic groups) seem to conflict. With realname enabled, all non-super users will be hung after a single member attempts to join (subscribe) or remove (unsubscribe) from a group. Once the super user accesses several pages (I have not been able to find a pattern) all is well again until the next member attempts to subscribe or unsubscribe. No errors are logged. The website appears totally non-responsive to the end user, though a PHP dubugger shows that Drupal is executing.

I've also opened an issue for the og module 1341626 since I cannot determine if this is an og problem or a realname problem.

Comments

David4514’s picture

StatusFileSize
new44.91 KB

I am making a little progress. The problem appears to be an infinite recursion issue. Attached is a call stack (most recent calls at top). The area highlighted by the red rectangle keeps repeating. I stopped it on the 46th iteration. I don't yet understand the problem.

David4514’s picture

Priority: Normal » Major

This is caused by a loop, though I do not know enough to assign fault.

  1. It begins with og.module (287) in the user_load_multiple function.
  2. This eventually causes a user entity to be loaded
  3. This will cause the hook_user_load to be driven for realname.
  4. Reaname performs an update, triggering a token_replacement.
  5. This eventually drives a hook_field_access which og_field_access has implemented.
  6. og_filed_access then eventually causes an og_load_entity.
  7. This starts another entity_load, thus begin the recursive loop.

This is locking out other members. This seems to be a major issue. Normal>>Major ??

muschpusch’s picture

I can confirm this behaviour. Similar error when filling in realname on user registration pages:

parts of my xdebug output:

 0.5305    8113692  31. realname_update() //somesite/modules/realname/realname.module:178
    0.5315    8115092  32. token_replace() //somesite/modules/realname/realname.module:202
    0.5316    8116436  33. token_generate() /var/spool/www/user/aegir/drupal-7.7/includes/token.inc:82
    0.5316    8117068  34. module_invoke_all() /var/spool/www/user/aegir/drupal-7.7/includes/token.inc:173
    0.5324    8121668  35. call_user_func_array() /var/spool/www/user/aegir/drupal-7.7/includes/module.inc:818
    0.5324    8122268  36. token_tokens() /var/spool/www/user/aegir/drupal-7.7/includes/module.inc:818
    0.5326    8124836  37. token_generate() //somesite/modules/token/token.tokens.inc:747
    0.5326    8125468  38. module_invoke_all() /var/spool/www/user/aegir/drupal-7.7/includes/token.inc:173
    0.5343    8130604  39. call_user_func_array() /var/spool/www/user/aegir/drupal-7.7/includes/module.inc:818
    0.5343    8131204  40. field_tokens() /var/spool/www/user/aegir/drupal-7.7/includes/module.inc:818
    0.5455    8176400  41. field_view_field() //somesite/modules/token/token.tokens.inc:1368
    0.5475    8182384  42. _field_invoke_default() /var/spool/www/user/aegir/drupal-7.7/modules/field/field.module:934
    0.5475    8183192  43. _field_invoke() /var/spool/www/user/aegir/drupal-7.7/modules/field/field.attach.inc:375
    0.5475    8186376  44. field_default_view() /var/spool/www/user/aegir/drupal-7.7/modules/field/field.attach.inc:198
    0.5477    8189432  45. field_access() /var/spool/www/user/aegir/drupal-7.7/modules/field/field.default.inc:217
    0.5478    8190548  46. og_field_access_field_access() /var/spool/www/user/aegir/drupal-7.7/modules/field/field.module:1020
    0.5478    8191044  47. og_user_access_entity() //somesite/modules/og/og_field_access/og_field_access.module:62
    0.5490    8193896  48. og_get_entity_groups() //somesite/modules/og/og.module:1866
    0.5491    8194672  49. og_load_entity() //somesite/modules/og/og.module:1952
    0.5491    8195164  50. entity_load() //somesite/modules/og/og.module:2966
    0.5491    8195640  51. DrupalDefaultEntityController->load() /var/spool/www/user/aegir/drupal-7.7/includes/common.inc:7489
    0.5505    8214536  52. UserController->attachLoad() /var/spool/www/user/aegir/drupal-7.7/includes/entity.inc:204
    0.5517    8218684  53. DrupalDefaultEntityController->attachLoad() /var/spool/www/user/aegir/drupal-7.7/modules/user/user.module:333
    0.5524    8222616  54. call_user_func_array() /var/spool/www/user/aegir/drupal-7.7/includes/entity.inc:334
    0.5524    8223028  55. realname_user_load() /var/spool/www/user/aegir/drupal-7.7/includes/entity.inc:334
    0.5524    8223096  56. realname_load_multiple() //somesite/modules/realname/realname.module:89
    0.5526    8223784  57. realname_update() //somesite/modules/realname/realname.module:178
    0.5526    8223784  57. realname_update()/somesite/modules/realname/realname.module:178
[and it starts again]
David4514’s picture

StatusFileSize
new734 bytes

Here is the hack that I used. I had created a field named "field_displayname" which I associated with the user. This hack tests for that name in the og_field_access_field_access function. If the name matches, it returns true since OG should not care about this field. This stops the recursive loop for me.

Edit: I should note that this is an OG patch, not a realname patch.

muschpusch’s picture

I had the error on the user pages. My really bad fix:

Disable in the funtion realname_update
//module_invoke_all('realname_update', $realname, $account);

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

I'm unable to reproduce this bug with the following steps:

1) Fresh Drupal install with OG 7.x-2.x dev
2) Define name_first and name_last fields.
3) Configure RealName to use [user:field_name_first] [user:field_name_last] for the user token.
4) Create a public group
5) Create a Bob Jones user
6) Log in as Bob Jones
7) Join a public group

Perhaps this is only reproducible with OG-7.x-1.x?

davidpugh’s picture

Issue summary: View changes

Unable to reproduce with
Website running:
Drupal 7 with OG 7.x-2.9
Real Name 7.x-1.3