Users from Active-Directory in Confluence coming up twice in @mentions

Hey,

like the title says:

When I use the @mention functionality on a page or comment, the auto-completer shows users from the Active-Directory twice. The links behind these users, which point to their profiles, are different. For example:

I want to mention myself (my username is sko) it shows up my name twice and the links to my profile are "~SKO" and "~sko" (upper case vs. lower case).

There might be the problem, that our Active-Directory ships only upper-case usernames.

How can I avoid showing up the usernames twice?

3 answers

1 accepted

it's a problem releted to the alredy indexed content on confluence table, i'm out of office and i can write you only something that i remember:

indexed content will be saved on "content" table of your database.

Indexed users (the whom u find in search, mention etc) will be here too.

with this query

select * from CONTENT where CONTENTTYPE<>'USERINFO';

u can find who is indexed here. for example if u have added 2 active directory and so 2 user are added or u have worked with renaming user, u can have 2 row with the same username.

U can delete from here and reindex, but as you alredy know, you are deleting directly from DB, backup and test it before going live.

hope it helps, i don't have my documentation here :)

This is exactly it. The Accounts displaying up twice are in the content table twice, too.

here is my statement for getting the affected users:

select lower(username), count(lower(username))
from content 
where contenttype = 'USERINFO' and prevver is null 
having count(lower(username)) &gt; 1 
group by lower(username) 
order by count(lower(username)) desc, lower(username)

For the rest, I think I will find a solution. Maybe you can add some more information when you are back in office?

So I guess, one way to solve this would be to reindex from scratch?!

That's weird, first let us know if users from AD are duplicated, in other words, are there same user names from AD and internal?

You can check it from Confluence DB running this followin query:

select * from cwd_user

As the Confluence shows both users in upper case and lower case I suspect this article could be related to your issue as we can see here:

https://confluence.atlassian.com/display/CONFKB/Duplicates+in+the+People+Directory

Please try the resolution suggested and let us know if it helps.

Hi, thanks for your response.

To answer your question: no, there are no duplicates.

Before I asked this question, we had two ADs as failover, like it is mentioned in your linked knowledge base article. In our test environment, I removed the second AD and rebuilt the index.

That did not help.

Maybe it is worth trying to build index from scratch?

Hi Mirek,

thank you for your suggestion. On which Confluence version are you running at the moment? We are on 4.0.5.

It is right, that both links work. I can confirm that.

Hi Steve,

I am pretty sure that Build index from scratch will not fix this..

We are having the same problem for a loooooong time hoping that new version of Confluence will fix that but unfortunately this is probably a bigger issue.. maybe related to Crowd.. do not know..

In our case only few users are having this problem.. and our profile names are very similar.. The only difference is that only first letter is upper case: "~Name" and "name" .. No matter what username you will choose it points you to the correct, same page..

Hi Steve,

On production we are using 4.2.1 however I did a test upgrade to 5.0.2 on the test system and the issue still exist..

FYI..

This is also an issue not only when mentioning an user but also when starting to search for him using search field. Maybe this will help find the cause of it..

Right,

I checked this. I get two Persons, this time both are linked to upper case (~SKO). Clicking the link redirects to the lower case url (~sko/my-home-site).

I haven't found a solution, yet. Any other suggestions? Maybe a good sumup of our knowledge, so I can accept an answer. :)

Hi all,

Do you find a solution, I have this bug too from Confluence 5.4.4 and Confluence 5.3?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Color tables for a shiny Confluence page

...; ## Developed by: Alana Fernando ## Shared with love ## @param style:title=style type|type=enum|required=true|desc=Choose a style.|enumValues=Style1,Style2,Style3,Style4,Style5 ## @param alignment:title...

144 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you