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

When a user checks the "Save for Later" Tab under Profiles and has pages created by other users marked as favourite, StackOverflowError is encountered

    XMLWordPrintable

Details

    Description

      Summary

      When a user checks the "Save for Later" Tab under Profiles and has pages created by other users marked as favourite, below error is encountered

      When user only has self created pages marked as favourite , there is no error

      Reproduction Steps

      1. Install Confluence version 8.5.5 with Java17 (use the installer method)
      2. Create two users, User 1 and User2
      3. Create a Page, logged in as User1
      4. Now Log in as User2 and Mark the Page created by User 1 as "Save for Later"
      5. Choose your profile picture at top-right of the screen, then choose Saved for later

      Actual Result

      Error in logs:

      2024-01-19 07:24:02,371 ERROR [http-nio-8090-exec-10 url: /users/viewmyfavourites.action; user: user2] [views.velocity.result.VelocityResult] doExecute Unable to render velocity template: '/users/myfavourites.vm'
       -- url: /users/viewmyfavourites.action | userName: user2 | action: viewmyfavourites | referer: http://10.140.17.239:8090/users/viewmyprofile.action | traceId: b49b1295fc517c97
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getRenderedTemplateHtml' in  class com.atlassian.confluence.plugins.soy.VelocityFriendlySoyTemplateRenderer threw exception java.lang.StackOverflowError at /users/myfavourites.vm[line 30, column 44]

      Expected results

      Workaround:

      We recommend you choose one of the following options to workaround this issue:

      1. Use Java 11, as this behavior is only on Java 17, or
      2. Change <installation_directory>/confluence/includes/soy/pagelist.soy line #358 from
        Old value: 
        {if $user and $user != ''}
        

        New Value:

        {if $user} 

      Attachments

        1. image-2024-01-18-21-00-34-758.png
          image-2024-01-18-21-00-34-758.png
          48 kB
        2. image-2024-01-19-13-05-37-419.png
          image-2024-01-19-13-05-37-419.png
          281 kB
        3. screenshot-1.png
          screenshot-1.png
          122 kB
        4. screenshot-2.png
          screenshot-2.png
          80 kB

        Issue Links

          Activity

            People

              6ce45665ee6c Anoop Singh
              d51fc966722f Shivangi Nayak
              Votes:
              44 Vote for this issue
              Watchers:
              76 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: