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

Unable to Save Page if the Draft contains a Link to a Deleted Space

    XMLWordPrintable

Details

    Description

      Same as in CONFCLOUD-54860:

      Summary

      If a draft contains a link to a removed space, (space exists when creating the draft, but the space was removed while the draft is still yet to be published), then attempts to save the page will fail with this error:

      2017-05-03 11:58:46.019681500 2017-05-03 11:58:46,013 ERROR [http-bio-1994-exec-264] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: Could not unmarshal a link in the editor.
      2017-05-03 11:58:46.019683500  -- url: /wiki/rest/tinymce/1/drafts | traceId: c8ba9d74ca33d1a9 | userName: sysadmin | referer: https://hipagesgroup.atlassian.net/wiki/pages/resumedraft.action?draftId=134930910&draftShareId=0a6c4505-43f5-4b2f-8137-af10991755d8
      2017-05-03 11:58:46.019684500 com.atlassian.confluence.content.render.xhtml.editor.link.CannotUnmarshalLinkException: Could not unmarshal a link in the editor.
      ...
      2017-05-03 11:58:46.021669500 Caused by: com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.CannotResolveResourceIdentifierException: Unable to resolve the resource identifier IdAndTypeResourceIdentifier[id=8060929,type=space]
      2017-05-03 11:58:46.021678500 	at com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.IdAndTypeResourceIdentifierResolver.resolve(IdAndTypeResourceIdentifierResolver.java:50)
      2017-05-03 11:58:46.021679500 	at com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.IdAndTypeResourceIdentifierResolver.resolve(IdAndTypeResourceIdentifierResolver.java:20)
      2017-05-03 11:58:46.021686500 	at com.atlassian.confluence.content.render.xhtml.editor.resource.identifiers.IdAndTypeAnalyzingResourceIdentifierUnmarshaller.unmarshal(IdAndTypeAnalyzingResourceIdentifierUnmarshaller.java:60)
      2017-05-03 11:58:46.021687500 	at com.atlassian.confluence.content.render.xhtml.editor.resource.identifiers.IdAndTypeAnalyzingResourceIdentifierUnmarshaller.unmarshal(IdAndTypeAnalyzingResourceIdentifierUnmarshaller.java:26)
      2017-05-03 11:58:46.021694500 	at com.atlassian.confluence.content.render.xhtml.editor.link.EditorLinkUnmarshaller.unmarshal(Ed
      

      The issue also occurs when you delete a Space and then try to Edit an existing page that has a link to a page from that Space.

      Steps to Reproduce

      1. Create a test page
      2. Edit the page (after it has been created in step 1), and add a link to a space. Do not publish the draft at this point
      3. In a separate browser tab, remove the space that was linked earlier
      4. Attempt to publish the draft containing that space link now

      Expected Results

      The page should be published, with a broken space link

      Actual Results

      Page publishing fails, with the error in the logs above, and this error in the UI:

      Workaround 1

      Turn off Collaborative Editing.

      Workaround 2

      1. Copy current page.
      2. Delete current page.
      3. Rename the copy such the original one.

      Workaround 3

      Remove the broken link and try to save the page.

      7/21/2020 Update:

      Please note that we've verified that this bug is still open as commented by Christoffer below. We're awaiting for further review by our developers.

      Attachments

        Issue Links

          Activity

            People

              oshen@atlassian.com Oliver Shen
              mmachado Mateus Machado (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: