Unable to View Page History because of User with Multiple Display Names
User is unable to view a page or History of a page.
The following appears in the
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUserFullName' in class com.atlassian.confluence.pages.actions.ViewPreviousVersionsAction threw exception org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at template/includes/macros.vm[line 125, column 22] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)
Run the following query to identify whether you're encountering the exact problem mentioned in this KB Article:
select * from cwd_user where display_name in (select display_name from cwd_user where id in (select id from cwd_user group by display_name having count(id) <> 1)) order by display_name;
If the result is more than one, please proceed to the resolution. Otherwise, please contact Atlassian Support to get better assistance.
There's no known cause at the moment.
- Backup your database
Delete all the duplicate users in the query result of Diagnosis section