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

Viewfile macro intermittently failed to render a PDF/PPT file in a page

      Steps to reproduce:
      1. Attach some PPT and PDF files to a Confluence page
      2. Embed then into the page using viewfile macro
      3. Result: All of the files were rendered just fine
      4. BUT randomly and intermittently, when you revisit the same page again, one of the viewfile macro from all of the viewfile macros will not be rendered - at times only certain page in the PDF is rendered although all of the pages can be rendered just fine previously. The same scenario could happened to the PPT file too. You'll see this kind of error in the logs:
        WARN [http-8534-4] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : PK Presentation 2013-11-20.ppt with page number 3, waited : 300, now executing in background.
        

      Refreshing the page (at times this has to be done twice) helps to render the affected PDF/PPT file once more. Viewing the individual PDF/PPT using viewfile macro in an individual page do not have the same problem.

      Workaround 1 - new File Viewer

      Use the new File Viewer to embed the document in the page.

      Workaround 2 - generate the slides again

      To force Confluence generate the slide images again:

      1. Get the attachment ID for the attachment with the problem. To do so, please run the following SQL query in your Confluence database:
        select attachmentid from attachments where prevver is null and title = 'filename.ext';

        Please replace filename.ext with the filename with the problem.

      2. Go to the folder <CONFLUENCE_DATA>/viewfile/.
      3. Remove all files containing the attachment id from step #1. Filenames will look like slide-1234-1 where 1234 is the attachment id.
      4. Go to the page containing the attachment embedded in it. This should recreate the images for the slides.

            [CONFSERVER-32515] Viewfile macro intermittently failed to render a PDF/PPT file in a page

            Still broken in Confluence 6.15.1. Deleting the Viewfile plugin cache does not work as a permanent fix.

            Caterina Trainito added a comment - Still broken in Confluence 6.15.1. Deleting the Viewfile plugin cache does not work as a permanent fix.

            Dalectric added a comment -

            Thanks for the reply, I've added to that request and add a comment as well.

            Dalectric added a comment - Thanks for the reply, I've added to that request and add a comment as well.

            Hi eddy5, there is not currently a conversion tool, but we do have an improvement request for one here: CONF-32097. If you think it would be valuable please add your vote there, and feel free to comment about how this would be helpful for you as well.
            For the meantime, you can manually edit any old macros that you want to replace. Just edit the page, go to Insert (+) > Files and Images, and select the file.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Hi eddy5 , there is not currently a conversion tool, but we do have an improvement request for one here: CONF-32097 . If you think it would be valuable please add your vote there, and feel free to comment about how this would be helpful for you as well. For the meantime, you can manually edit any old macros that you want to replace. Just edit the page, go to Insert (+) > Files and Images, and select the file.

            Dalectric added a comment -

            Also what about all the content we already have in the old macro. That still breaks. Do we have to go through and replace the content with the new macro? Is that really an acceptable solution?

            Dalectric added a comment - Also what about all the content we already have in the old macro. That still breaks. Do we have to go through and replace the content with the new macro? Is that really an acceptable solution?

            mahmadi added a comment -

            I don't think this method of inserting PDF files should be considered as replacement of pdf micro. With pdf micro, file can be viewed as slides right in the confluence page which is very convenient. While in new way of viewing files, file should be opened out of confluence page and some times it can't open it and says you must download it.

            mahmadi added a comment - I don't think this method of inserting PDF files should be considered as replacement of pdf micro. With pdf micro, file can be viewed as slides right in the confluence page which is very convenient. While in new way of viewing files, file should be opened out of confluence page and some times it can't open it and says you must download it.

            Hi @mahmadi, this issue is obsolete in Confluence 5.7, as we have introduced a new way of viewing files in Confluence. See this page for more information about previewing files. You can use this new previewer instead of the old viewfile macro, as this problem does not occur. Hope this helps!

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Hi @mahmadi, this issue is obsolete in Confluence 5.7, as we have introduced a new way of viewing files in Confluence. See this page for more information about previewing files. You can use this new previewer instead of the old viewfile macro, as this problem does not occur. Hope this helps!

            mahmadi added a comment -

            What version exactly has fix for this issue? Currently we are using 5.7.
            Thanks

            mahmadi added a comment - What version exactly has fix for this issue? Currently we are using 5.7. Thanks

            Thank you everyone for your feedback. In a recent release of Confluence (5.7) we introduced a new way to embed, preview and collaborate on files. This new experience does not require you to insert a macro first, but automatically embeds a preview of the file if you upload it. In addition, it supports many more file types and additional features which are not available in the View File macro. All future efforts on improving our files experience will be on the new solution.
            As discussed in previous comments, this bug does not exist in our new file experience and we encourage you to transition your embedded view file macro into an embedded file to make use of the new file functionality. Given that the bug does not occur in the new file experience, we will be closing this issue.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Thank you everyone for your feedback. In a recent release of Confluence (5.7) we introduced a new way to embed, preview and collaborate on files. This new experience does not require you to insert a macro first, but automatically embeds a preview of the file if you upload it. In addition, it supports many more file types and additional features which are not available in the View File macro. All future efforts on improving our files experience will be on the new solution. As discussed in previous comments, this bug does not exist in our new file experience and we encourage you to transition your embedded view file macro into an embedded file to make use of the new file functionality. Given that the bug does not occur in the new file experience, we will be closing this issue.

            April added a comment -

            @dunterwurzacher, Hi Denise, thanks for the info! Sounds like this will work for some pages anyway.... Since the viewfile macro dies most often on pages with multiple instances, maybe the viewer can help those page authors trim down to just one.
            Can't upgrade right now (collation woes), but we'll look at this soon. Have a great day!

            April added a comment - @dunterwurzacher, Hi Denise, thanks for the info! Sounds like this will work for some pages anyway.... Since the viewfile macro dies most often on pages with multiple instances, maybe the viewer can help those page authors trim down to just one. Can't upgrade right now (collation woes), but we'll look at this soon. Have a great day!

            Hi adaly! Nothing has changed in terms of file permissions, so any scenario that worked for you before will be the same now. Attachments inherit the permissions from the page they're attached to, so you can see this doc for more information.
            To answer your questions specifically, the new file previewer just shows a small preview of the first page of the document, and when a user clicks on it they can navigate through the full document. They would be able to download the attachment (just like before), but they would not be able to upload a new version of it. So, as before, only those users who have Edit permission to the page would be able to edit and upload a new version of the document.
            Hope this helps!

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Hi adaly ! Nothing has changed in terms of file permissions, so any scenario that worked for you before will be the same now. Attachments inherit the permissions from the page they're attached to, so you can see this doc for more information. To answer your questions specifically, the new file previewer just shows a small preview of the first page of the document, and when a user clicks on it they can navigate through the full document. They would be able to download the attachment (just like before), but they would not be able to upload a new version of it. So, as before, only those users who have Edit permission to the page would be able to edit and upload a new version of the document. Hope this helps!

              Unassigned Unassigned
              hsuhailah Hanis Suhailah (Inactive)
              Affected customers:
              60 This affects my team
              Watchers:
              59 Start watching this issue

                Created:
                Updated:
                Resolved: