CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Only user's last name appears in search results...
Pages: [1]

Author Topic: Only user's last name appears in search results...  (Read 660 times)

narragansett

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.41
  • PHP version: 5.3.2-1
Only user's last name appears in search results...
October 31, 2011, 08:07:12 am
When I first set up Civi, I changed the "Individual Display Name Format" & "Individual Sort Name Format" settings in "civicrm/admin/setting/preferences".  I wanted the custom field {contact.nick_name} to replace the user's {contact.first_name}, as we have a number of folks who go by non-obvious nick names (ex. Kenneth Smith goes by his shortend middle name, Rob - display should read "Rob Smith" instead of "Kenneth Smith").

This worked, but as soon as any update was made to the user's information, either directly or via the import function, the {contact.nick_name} no longer is displayed, i.e. there is no 'first name' of any type displayed at all.  This is annoying when looking up folks with unique last names, but we also have 27 folks with the last name "Johnson", so this is entirely unacceptable behavior.

I have tried replacing {contact.nick_name} with {contact.first_name} (i.e. reverting back to default behavior), but the displayed name does not change.  I have no idea how to proceed...

If possible, I'd like to simply have the nick name displayed persistently.  If there is a way to make this happen, please let me know and I'll implement it.

If displaying the nick name is not possible, then I need to know how to get the first name to appear again.  I have searched both the forum directly, as well as used Google, and I keep seeing references to deleting the contents of the "templates_c" directory, but I don't want to just blindly try something suggested as a solution to different problems without some type of guidance.

I have dealt with this for months now by simply re-importing the nick name fields - this seems to 'refresh' the display and causes them to appear again in searches.  However, I've now granted search access to a number of other users (the Board of Directors), and will be handing over control entirely to a new person in December, so this issue will no longer be affecting just me.  I really appreciate any help anyone can provide on this matter.

Thanks!

ctarascio

  • I post frequently
  • ***
  • Posts: 334
  • Karma: 30
    • American Friends Service Committee
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.20
  • PHP version: 5.3.13
Re: Only user's last name appears in search results...
October 31, 2011, 08:43:21 am
hi,
i know this reply doesn't solve your issue but, for what it's worth, i replaced {contact.first_name} with {contact.nick_name} in the "Individual Display Name Format" & "Individual Sort Name Format" settings in "civicrm/admin/setting/preferences and i did not experience the issues you reported in your post.

specifically:
--if i edited a pre-existing record and added a nickname to it, that record was displayed as (contact.last_name},{contact.nick_name}
--if i added a new record with first, last and nick names it was displayed as (contact.last_name},{contact.nick_name}
--if i removed the nickname form a record only the last name was displayed
--if i edited the nickname and changed it to something different, it was displayed as (contact.last_name},{contact.nick_name} with teh new nick name

2 things:
--you referred to {contact.nick_name} as a custom field. is it?
--i tried the above on the 3.4 demo. perhaps something changed in 3.5?

hope this was at least somewhat helpful,
cynthia


narragansett

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.41
  • PHP version: 5.3.2-1
Re: Only user's last name appears in search results...
October 31, 2011, 09:47:44 am
Cynthia-

You know, I thought I had remembered adding the "Nick Name" field, but it is certainly possible I did not.  Of course, that doesn't change the problem I'm seeing, it would just remove one of the possible variables in troubleshooting (custom vs built in field).

Also, none of the 4 items you mentioned cause any troubles for me either.  So, I did a bit more testing to see if I could give a specific example...

1 - as I mentioned, I have changed the "Display" & "Sort" name format settings in civicrm/admin/setting/preferences back to their default (i.e. first_name instead of nick_name).  I then logged into my normal (non-administrative account) and used the "My Account" link in Drupal to modify my address as a test.  I then searched on my last name only to see what the search results would be.

The name displayed is now last_name, first_name.

2 - I then logged back into the admin account, switched the "Display" & "Sort" names back to nick_name, logged into my non-admin account, changed the address back, and did a search.

The name displayed is now last_name, nick_name.  So far so good.

3(*) - I then logged back in as admin & imported a single user's information back into the database, choosing the "update" option.  I did not re-import the user's nick name, then I searched for that user.

The name displayed is last_name only - though when I click on that name, the correct nick name still appears in the user's account info, so it is still there...

4 - As admin, I manually corrected the address info for the account I updated via import.  Upon clicking "save", the nick name reappeared in the search output...

5 - I have seen a number of user accounts 'lose' their nick name in search records that I know I have not manipulated, either as admin or via any imported data.  I cannot re-create what has happened as I was not the one who made the changes, but if I can figure it out I'll post that info here as well.

If it helps, users have full access to manipulate most of their own data.  Apart from them, I am the only person who has the ability to edit any information in the database.

Thanks.
« Last Edit: October 31, 2011, 09:50:25 am by narragansett »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Only user's last name appears in search results...
October 31, 2011, 03:13:38 pm

3 is a bug with the code base (and potentially a non-trivial fix). Sort/Display names were made configurable in 3.x versions of Civi.

for now, i would recommend that when u do the import with update, also import the nickname

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Only user's last name appears in search results...

This forum was archived on 2017-11-26.