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

Wrong URL on Task Report and Task Tab in People Page, Returns Page not Found

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Symptom
      Task Report and Task Tab in People Page give wrong URL of the pages, and "Page Not Found" is shown when clicked. It happens only when page titles contains non-alphanumeric characters (not a pretty URL).

      Steps to reproduce

      1. Login to Confluence
      2. Create a page with a title containing non-alphanumeric characters (has some tasks inside).
      3. Go to "Tasks" in my page (<CONFLUENCE_URL>/plugins/inlinetasks/mytasks.action)
      4. Click the link on "Tasks appear on" column

      Finding
      Such links contain two question marks (please see TheProblem.jpg)

      Workaround
      Manually replace the second question mark to an ampersand. For example:

      • Before: https://<SUBDOMAIN>.atlassian.net/wiki/pages/viewpage.action?pageId=4489219?focusedTaskId=1
      • After: https://<SUBDOMAIN>.atlassian.net/wiki/pages/viewpage.action?pageId=4489219&focusedTaskId=1

            [CONFSERVER-37132] Wrong URL on Task Report and Task Tab in People Page, Returns Page not Found

            Anne EQS added a comment -

            Any chance for a backport to 5.8.4?

            Anne EQS added a comment - Any chance for a backport to 5.8.4?

            Hi again,

            sorry, workaround only works for pages which embed the HTML code. This is *not * done (Only Atlassian know why...) for the Tasks Tab in the profile page.

            Jan

            Jan-Peter Rusch added a comment - Hi again, sorry, workaround only works for pages which embed the HTML code. This is *not * done (Only Atlassian know why...) for the Tasks Tab in the profile page. Jan

            Hi asheed,

            Sorry for the inconvenience caused by this bug.
            I am guessing you tried the workaround on Task Tab in People page, but not on Task Report macro. It seems the workaround only effects on Task Report macro.

            Mai Nakagawa (Inactive) added a comment - Hi asheed , Sorry for the inconvenience caused by this bug. I am guessing you tried the workaround on Task Tab in People page, but not on Task Report macro. It seems the workaround only effects on Task Report macro.

            Woojin Ahn added a comment -

            There are three edit box in Custom HTML page.
            1. At end of the HEAD.
            2. At beginning of the BODY.
            3. At end of the BODY

            I applied code.
            But, error is still occurred..

            Woojin Ahn added a comment - There are three edit box in Custom HTML page. 1. At end of the HEAD. 2. At beginning of the BODY. 3. At end of the BODY I applied code. But, error is still occurred..

            Sorry, you should ask Atlassian for a Cloud solution, as neither the solution I provided nor the HTML macro is available on Cloud.

            Jan-Peter Rusch added a comment - Sorry, you should ask Atlassian for a Cloud solution, as neither the solution I provided nor the HTML macro is available on Cloud.

            Thanks, but where do you put this on confluence ondemand ?

            Jérôme Laurens added a comment - Thanks, but where do you put this on confluence ondemand ?

            Quick fix using some custom JS. Put it in Userdefined HTML AFTER Body:

            <!-- Fix Tasklist macros -->
            <script type="text/javascript">
            AJS.toInit(function() {
              
              AJS.$('a.task-location').each(function() {
                  if(this.href.indexOf('pageId') > -1) {
                    this.href = this.href.replace('?focusedTaskId','&focusedTaskId');
                  }
              });
              
            });
            </script>
            <!-- End Fix Tasklist macros -->
            

            Jan-Peter Rusch added a comment - Quick fix using some custom JS. Put it in Userdefined HTML AFTER Body: <!-- Fix Tasklist macros --> <script type= "text/javascript" > AJS.toInit( function () { AJS.$( 'a.task-location' ).each( function () { if ( this .href.indexOf( 'pageId' ) > -1) { this .href = this .href.replace( '?focusedTaskId' , '&focusedTaskId' ); } }); }); </script> <!-- End Fix Tasklist macros -->

            This makes task handling in Confluence virtually useless, as we get lots of calls that Confluence is not working anymore.

            What we do the whole day is renaming the page titles to create pretty URLs...

            Is there a fix, eg. via custom HTML/Javascript around, which replaces the ?focusedTaskId to &focusedTaskId?

            Jan-Peter Rusch added a comment - This makes task handling in Confluence virtually useless, as we get lots of calls that Confluence is not working anymore. What we do the whole day is renaming the page titles to create pretty URLs... Is there a fix, eg. via custom HTML/Javascript around, which replaces the ?focusedTaskId to &focusedTaskId?

            Affects version 5.8.2

            Jan-Peter Rusch added a comment - Affects version 5.8.2

              ple Phong Quoc Le (Inactive)
              mnakagawa Mai Nakagawa (Inactive)
              Affected customers:
              23 This affects my team
              Watchers:
              44 Start watching this issue

                Created:
                Updated:
                Resolved: