I run into the following issue: For some users on my site, even though they filled out their Content Profile properly, the Realname is not showing at some places. In the Realname database table I can see that it is actually not computed and stored there. However, some Views (which use the User: Realname field) show the name correctly, same as for where I use theme(username) which also shows the name correctly. The Views which do not show the Realname correctly are mostly Blocks (as opposed to Menu Tabs and Pages which seem to show the Realname correctly). I am wondering, however, how some can show the Realname correctly while the Realname database table still does include the username.

Comments

jaochoo’s picture

After re-calculating the Realnames table, all Views show the Realname correctly.

jaochoo’s picture

Any update on this one?

jthorson’s picture

I can confirm this behaviour ... for some reason, usernames are getting written to the Realname table in the database instead of 'real' names.

However, it's very intermittent ... it's only occured on 3 of my last 10 registered users. I haven't had time to dig into the code and try and troubleshoot; but until I get the chance, I've been considering having a cron job rebuild the 'realname' table each night ...

jaochoo’s picture

Thanks for your comment. Can you tell me how yousetup that cronjob?

jthorson’s picture

Sorry for the late response ... but the plan was to find out the procedure call used by the 'rebuild realnames' button on the admin page, and have a hook_cron procedure call it from a custom module.

coderintherye’s picture

Status: Active » Postponed (maintainer needs more info)

I wonder if realname should have an option to add its own cronjob. So then if you check a box on the admin page we invoke a hook_cron that will rebuild the table.

I sometimes experience this issue as well, but haven't successfully tracked it down yet. Would be good if we got an idea if the usernames or real names have something funky about them that is preventing them from getting inserted correctly.

As it is, I think this is a "needs more info" because without some way to reproduce this effectively, it's going to be hard to track down.

thirdender’s picture

I'm able to trigger this behavior repeatedly in Drupal 7 with Realname 7.x-1.1. Create a View with a Realname field and Views Bulk Operations enabled. Enable the "Update real name" VBO option and run a few users through the action. After the VBO runs, the Realname is missing from the View. Inside the database, the users chosen for update are missing from the `realname` table. Viewing the user's page or calling `user_load($uid)` recreates the user's Realname in the database, which causes the name to start appearing in the View as well.

I had another VBO configured to toggle roles on selected users. This triggered the same behavior, so I tried adding a PHP action `user_load($account)` as the last action of my Rule. It didn't fix the problem, so I'm assuming something else is clearing the entry from the `realname` table after the Rule has finished running.

hass’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)