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

Pasting content with images to a template does not save the changes

    XMLWordPrintable

Details

    Description

      Summary

      1. When editing or creating a template in Confluence, if we were to paste any content from another page with image, the content will appear on screen, but if we were to save the template, the changes will be lost.

      Steps to replicate

      1. Edit an existing or create a new global template.
      2. Find a page in Confluence that has images and edit and copy the content with the image.
      3. Paste the content onto the template, and the content will appear.
      4. Save the template, and check on it again, and the content that we paste will be missing, and if we edited an existing template, the older content will still be there.

      Expected behavior

      1. Content that was pasted onto the template should be there after the template is saved.

      Current behavior

      1. Content that is pasted is missing as soon as the template is saved.

      Notes

      1. Issue seems to be with the image, as seen in the log entry below, and also as just pasting text does not cause the issue.
      2. Reproducible on all Chrome. IE and Firefox.

      Error in the logs.

      • 2019-07-16 22:24:34,833 ERROR [http-nio-8090-exec-11] [confluence.pages.actions.HeartbeatAction] startActivity No content found or no permission to view content with contentId: 9928705
         -- referer: http://localhost:8090/pages/templates2/editpagetemplate.action?entityId=9928705 | url: /json/startheartbeatactivity.action | traceId: 8756d1f7f6211a13 | userName: root | action: startheartbeatactivity
        2019-07-16 22:24:49,021 WARN [http-nio-8090-exec-5] [xhtml.editor.embed.EditorEmbeddedImageResourceUnmarshaller] unmarshal Error unmarshaling editor embedded image
         -- referer: http://localhost:8090/pages/templates2/editpagetemplate.action?entityId=9928705 | url: /pages/templates2/doeditpagetemplate.action | traceId: 9a6f88a530cf09a9 | userName: root | action: doeditpagetemplate
        java.lang.IllegalArgumentException: Content must not be null
        	at org.springframework.util.Assert.notNull(Assert.java:134)
        	at com.atlassian.confluence.pages.attachments.CachingAttachmentDao.getLatestAttachment(CachingAttachmentDao.java:72)
        	at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:145)
        	at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:111)
        	at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAttachment(DelegatorAttachmentManager.java:114)
        	at com.atlassian.confluence.pages.CachingAttachmentManager.getAttachment(CachingAttachmentManager.java:185)
        	at sun.reflect.GeneratedMethodAccessor1099.invoke(Unknown Source)
        

      Workaround

      1. After pasting the content, remove the image, and add it manually into the template.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smaran Sattesh M
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: