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

Chrome 14 and above can't displayed attached .swf file on a page

      Chrome 14 can't displayed attached .swf file on a page

      1. Finding

      After attaching .swf file to a page. Confluence couldn't show the attached .swf file using Multimedia macro. Instead of displaying, it will be returned as Missing Plug-In. It showed as below.

      2. Cause

      The macro generates different mime type when it is displayed as html on Chrome 14. Instead of generated as type="application/x-shockwave-flash" it was generated as type="application/x-shockwave-flash2-preview" that cause it couldn't be displayed on Chrome 14.

      3. Workaround

      A. Remove the type particular line from mime.types file

      1. Stop Confluence
      2. Navigate to <confluence_dir>/confluence_WEB-INF/classes
      3. Make a backup of mime.types file
      4. Change the following line
        image/vnd.rn-realflash rf swf
        

        to this line

        image/vnd.rn-realflash rf 
        
      5. Remove the following line from the mime.types
        application/x-shockwave-flash2-preview rf swf
        
      6. Restart Confluence

      B. Embed the file using html macro
      Enable {{

      {htm}

      }} macro, and insert macro in a page

      {html}
      <embed src="<attachment_path>/swf_file.swf">
      </embed>
      {html}
      

          Form Name

            [CONFSERVER-23268] Chrome 14 and above can't displayed attached .swf file on a page

            Confirmed Fixed.

            Reproduced in CAC (4.2.1).

            Tested on latest 4.2 stable check-out (i.e. the to be 4.2.2) - with Chrome 19 and FF11.

            Petch (Inactive) added a comment - Confirmed Fixed. Reproduced in CAC (4.2.1). Tested on latest 4.2 stable check-out (i.e. the to be 4.2.2) - with Chrome 19 and FF11.

            I've got to say this is a huge deal breaker! I agree with Mark Mielke. This should be a trivial fix. Confluence is using the wrong mime type. So fix it already and fix it in everything. Your silly hack doesn't work for On Demand. Very disappointed....take out the trash people.

            David Williams added a comment - I've got to say this is a huge deal breaker! I agree with Mark Mielke. This should be a trivial fix. Confluence is using the wrong mime type. So fix it already and fix it in everything. Your silly hack doesn't work for On Demand. Very disappointed....take out the trash people.

            Hopefully a fix will come soon from Atlassian as this also affects the OnDemand version and the workaround is not applicable there ist seems.

            John Campbell added a comment - Hopefully a fix will come soon from Atlassian as this also affects the OnDemand version and the workaround is not applicable there ist seems.

            According to Adobe, the correct MIME type to use for SWF is application/x-shockwave-flash.

            According to my RHEL 5.5 installation, /etc/mime.types only has one reference to SWF:

            application/x-shockwave-flash   swf
            

            I think there is an easy conclusion here. The "work around" is not a work around - it is the correct fix. The only MIME type that should reference SWF is application/x-shockwave-flash.

            As this is a trivial fix, and as Confluence is currently selecting the wrong MIME type for this file suffix, can this issue be added to a patch release?

            We're still stuck on Confluence 3.5.x - but at least if I see the patch in Confluence 4.1.x+, I can feel confident that a customization of this change back ported to Confluence 3.5.x until we are able to upgrade is a good choice, and will not diverge from the direction that Atlassian is taking on addressing this issue?

            Thanks.

            Mark Mielke added a comment - According to Adobe, the correct MIME type to use for SWF is application/x-shockwave-flash. According to my RHEL 5.5 installation, /etc/mime.types only has one reference to SWF: application/x-shockwave-flash swf I think there is an easy conclusion here. The "work around" is not a work around - it is the correct fix. The only MIME type that should reference SWF is application/x-shockwave-flash. As this is a trivial fix, and as Confluence is currently selecting the wrong MIME type for this file suffix, can this issue be added to a patch release? We're still stuck on Confluence 3.5.x - but at least if I see the patch in Confluence 4.1.x+, I can feel confident that a customization of this change back ported to Confluence 3.5.x until we are able to upgrade is a good choice, and will not diverge from the direction that Atlassian is taking on addressing this issue? Thanks.

            This seems to affect more than just Chrome, we're having the same issue when embedding a SWF using the multimedia plugin - won't display in any browser (Firefox, Chrome, Safari, IE) because of this issue. Will try the workaround I guess!

            Deleted Account (Inactive) added a comment - This seems to affect more than just Chrome, we're having the same issue when embedding a SWF using the multimedia plugin - won't display in any browser (Firefox, Chrome, Safari, IE) because of this issue. Will try the workaround I guess!

            File > Publish Settings > Project > Start and End > uncheck auto play is specific to Adobe Captivate.

            Robert Lauriston added a comment - File > Publish Settings > Project > Start and End > uncheck auto play is specific to Adobe Captivate.

            AndrewA added a comment -

            This issue has been confirmed in Confluence 4.0.3 with Chrome 15 as well.

            A note that I wanted to share regarding the workaround: you can use height and width vars in the HTML block to control the size of the video. For example:

            <embed src="http://localhost:8090/download/attachments/XXXXXX/Yourflashfile.swf?" height=X width=Y>

            The X and Y values should be taken from the properties of the captivate background to keep the original aspect ratio.

            Another note, if you are concerned about the SWF auto playing upon load you must change the auto play settings when creating the actual SWF. To do this in adobe, got to File > Publish Settings > Project > Start and End > uncheck auto play.

            AndrewA added a comment - This issue has been confirmed in Confluence 4.0.3 with Chrome 15 as well. A note that I wanted to share regarding the workaround: you can use height and width vars in the HTML block to control the size of the video. For example: <embed src="http://localhost:8090/download/attachments/XXXXXX/Yourflashfile.swf?" height=X width=Y > The X and Y values should be taken from the properties of the captivate background to keep the original aspect ratio. Another note, if you are concerned about the SWF auto playing upon load you must change the auto play settings when creating the actual SWF. To do this in adobe, got to File > Publish Settings > Project > Start and End > uncheck auto play.

            RianA added a comment -

            Hi Jason,

            I'm sorry I couldn't reply sooner on this. The workaround, is provided above. You could refer to it so that it might fix this issue.

            Hope it helps

            Best regards,
            Josua

            RianA added a comment - Hi Jason, I'm sorry I couldn't reply sooner on this. The workaround, is provided above. You could refer to it so that it might fix this issue. Hope it helps Best regards, Josua

            I've also confirmed this issue with Confluence 4.0 and Chrome 14.

            This issue is greater than minor to me, and I'm unsure about the work-a-round provided.

            Google Chrome 14.0.835.202 (Official Build 103287) m
            OS Windows
            WebKit 535.1 (branches/chromium/835@96063)
            JavaScript V8 3.4.14.28
            Flash 11,0,1,152
            User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1

            Thanks.

            jasonsturges added a comment - I've also confirmed this issue with Confluence 4.0 and Chrome 14. This issue is greater than minor to me, and I'm unsure about the work-a-round provided. Google Chrome 14.0.835.202 (Official Build 103287) m OS Windows WebKit 535.1 (branches/chromium/835@96063) JavaScript V8 3.4.14.28 Flash 11,0,1,152 User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 Thanks.

            This is not a solution. Enabling HTML is a security risk. Please provide an alternative.

            W Rijsemus added a comment - This is not a solution. Enabling HTML is a security risk. Please provide an alternative.

              pcamilleri Peter Camilleri [Atlassian]
              rjmasikome RianA
              Affected customers:
              14 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: