took a while to track this down but pretty sure a bug here. when an og is assigned to a user when the account is created the realname is not created.
actually the realname record is created; but it is blank; so technically this is likely more an issue with og getting in the way of the tokens being created.
both pathauto and realname use tokens:
- pathauto: [user:name]
- realname: [user:field_firstname] [user:field_lastname]
neither are correct when user account is first created.
when user account is re-submitted first time; the realname is corrected
when user account is re-submitted the second time; the url is corrected
if an og is not set at account creation time; both are created correctly immediately
i'll dig some more and create patch (will also try latest -dev of og; this is with 2.3)
Comments
Comment #1
liquidcms CreditAttribution: liquidcms commentedstill broken with latest -dev
Comment #2
liquidcms CreditAttribution: liquidcms commentedbetter title
Comment #3
liquidcms CreditAttribution: liquidcms commentedComment #4
liquidcms CreditAttribution: liquidcms commentedi think the pathauto part of this was broken by my custom user token code (always clone objects like $account and $node when using them in code.. ughh!!) but this isn't what breaks the realname values not getting stored correctly.
i do see in the call stack when creating account that OgMembership->save() is called which eventually gets to entity_load(). this runs all the $module_user_load hooks including the realname_user_load which i would guess does a user_load which does not yet have the realname saved and therefore ends up wiping it out of the $user object before the realnode module gets to save it..
Comment #5
liquidcms CreditAttribution: liquidcms commentedthis isn't a fix as there is a bug here somewhere in the interaction between og and realname; but until i get a chance to solve it or someone else does, in case any one else is having this issue, the following will hack in a fix:
Comment #6
liquidcms CreditAttribution: liquidcms commentedcame across this issue with another project; problem still exists; bumping to 2.7
a little more digging and i can see it is the entitymetadatawrapper that og adds in that breaks this.