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

Redirect screen does not show when moving a page with only a single current version to a different space

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 5.6.3
    • 5.5
    • None

      If you move a page with only a single current version to a new space I would expect requests to the old location to show the "The page you were looking for may have moved to another space" message with a link to the new location. It doesn't. If you make a subsequent edit of the page in the new location, the old location will now show this message.

      This looks like a problem with PageManager.getPossibleRedirectsNotInSpace(Space space, String pageTitle, int maxResultCount)

      To reproduce:
      Create a new page in space A
      Move it to space B
      Request the page from space A by going to the original url, not that it just shows the 404 page
      Edit the page in space B
      Again request the page from space A, not it shows the redirection information.

            [CONFSERVER-34221] Redirect screen does not show when moving a page with only a single current version to a different space

            Never mind my above comment, the bug is existing https://jira.atlassian.com/browse/CONF-34072, qa is a pass.

            Glenn Martin (Inactive) added a comment - Never mind my above comment, the bug is existing https://jira.atlassian.com/browse/CONF-34072 , qa is a pass.

            drizzuto all looks good. Go ahead with merge.

            Petro Semeniuk (Inactive) added a comment - drizzuto all looks good. Go ahead with merge.

            The issue here is that HibernatePageDao.findPagesWithHistoricalTitle does what it says on the box, it gets pages that had the title in a historical version. The current pages with the title are not returned, only the current page of a historical version that had the title.

            If we look at the first subselect

            ...
            page0_.CONTENTID in(
            	select distinct page2_.PREVVER 
            ...
            

            It says "give me pages where the content id was another pages previous version."

            So we need one of three fixes here. Either introduce another gnarly query and method on PageDao to get exactly what we want.

            Or update getPossibleRedirectsNotInSpace to first just check for current content with the title not in the space using getAbstractPageByTitle, and if that doesn't find enough candidates also check for previous versions with the title via the dao findPagesWithHistoricalTitle()

            Or have the move page / blogpost create a new version of the content.

            Steve Lancashire (Inactive) added a comment - The issue here is that HibernatePageDao.findPagesWithHistoricalTitle does what it says on the box, it gets pages that had the title in a historical version. The current pages with the title are not returned, only the current page of a historical version that had the title. If we look at the first subselect ... page0_.CONTENTID in( select distinct page2_.PREVVER ... It says "give me pages where the content id was another pages previous version." So we need one of three fixes here. Either introduce another gnarly query and method on PageDao to get exactly what we want. Or update getPossibleRedirectsNotInSpace to first just check for current content with the title not in the space using getAbstractPageByTitle, and if that doesn't find enough candidates also check for previous versions with the title via the dao findPagesWithHistoricalTitle() Or have the move page / blogpost create a new version of the content.

              drizzuto David Rizzuto
              slancashire Steve Lancashire (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: