Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-91252

The "Follow" button in the "People who like this" is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.19.12
    • User - Follow
    • None

    Description

      Issue Summary

      When a Confluence page has more than 2 likes, clicking on the "X others" link will prompt a pop-up showing all users who liked the page:

      Next to every user, there is a "Follow" button that leads to a dead URL (/rest/likes/1.0/user/USERNAME/following?username=USERNAME) result in an error 500:

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Create a page
      2. Once the page gains more than 2 likes
      3. Click on the "2 others" link
      4. Click on one of the "Follow" button in the pop-up

      Expected Results

      User will be able to follow that particular user

      Actual Results

      No error or confirmation returns in the UI, clicking on the button does nothing. No "follow" record is added.

      The below exception is thrown in the atlassian-confluence.log file:

      2023-09-06 17:19:11,687 ERROR [http-nio-27190-exec-1 url: /c7190/rest/likes/1.0/user/yy/following; user: yy] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : 
       -- referer: http://localhost:27190/c7190/display/TEST/dsfsdfsdfsd | url: /c7190/rest/likes/1.0/user/yy/following | traceId: abea1cb631cbd289 | userName: yy
      org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
      	at org.springframework.orm.hibernate5.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1047)
      	at org.springframework.orm.hibernate5.HibernateTemplate.lambda$save$11(HibernateTemplate.java:614)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:367)
      	at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:334)
      	at org.springframework.orm.hibernate5.HibernateTemplate.save(HibernateTemplate.java:613)
      	at com.atlassian.confluence.follow.persistence.dao.hibernate.HibernateConnectionDao.followUser(HibernateConnectionDao.java:107)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
      	at com.sun.proxy.$Proxy140.followUser(Unknown Source)
      	at com.atlassian.confluence.follow.DefaultFollowManager.followUser(DefaultFollowManager.java:51)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at com.atlassian.confluence.util.profiling.ConfluenceMonitoringMethodInterceptor.invoke(ConfluenceMonitoringMethodInterceptor.java:36)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
      	at com.sun.proxy.$Proxy215.followUser(Unknown Source)
      

      Workaround

      To follow the user, click on the username in the pop-up instead. Once you are at the user's profile, click on the "Follow" link at the top left corner of the screen.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jwaihou Jonathan Soo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: