Flash Player 10 + SWF files + eZ Publish 4 = problem ?

Author Message

Michal Slocinski

Sunday 19 October 2008 2:39:11 pm

Hi,

today I installed new version of Adobe Flash Player 10.0.12.36 and noticed that flash files published in eZ Publish are not displayed. Movie is simply not loaded (at least under IE7/Vista and FF3.0.3) and after right clicking on it Flash plugin says in context menu "Movie not loaded". Old Flash Player (ver 9) didn't have any problems with it.

After some digging and testing, I found root cause of this issue - by default, eZ Publish inserts following HTTP header for all binary files:

header( "Content-disposition: attachment; filename=\"$originalFileName\"" );

above line is inside:

kernel/classes/binaryhandlers/ezfilepassthrough/ezfilepassthroughhandler.php

After removing this line movies are loaded properly.

So I did more digging over the net and found this article:

http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_print.html#head32

which explains that handling of Content-Disposition header is a new "feature" of Flash Player 10.

Basically as a solution they suggest to:
a) reconfigure HTTP server to not send Content-Disposition header for trusted Flash files
b) or other dodgy workaround in Flash file itself, which as they say may not even work in certain scenarios

I suppose this should be handled as bug in eZ Publish to provide more elegant way of dealing with Content-Disposition for SWF files and until this will happen - people should be adviced to manually fix this problem ... ?

BTW - I tried more elegant approach - stripping this header in .htaccess with:

<FilesMatch "\.swf$">
Header unset Content-Disposition
</FilesMatch>

but somehow it doesn't work for me, so for now I've to stay with hacking ezfilepassthroughhandler.php :-/

Michal

Kristof Coomans

Monday 20 October 2008 12:34:20 am

Hi Michal

Can you report this in our issue tracker please? At http://issues.ez.no/ProjectSelect.php?Id=3. Thanks!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Michal Slocinski

Monday 20 October 2008 1:13:25 am

Done: http://issues.ez.no/IssueView.php?Id=13783

Salvatore Guarino

Thursday 23 October 2008 3:02:41 am

I had the same problem, temporary solved hacking the ezfilepasstroughhandler.php.
I tried to use mod_headers also in apache virtualhost configuration file, but doesn't work...

Jostein Amlie

Tuesday 04 November 2008 11:06:27 am

The same happens with eZ 3.8.6, temporary hack for me was to move flash out of content, and into image-catalog. I have just one flash on the frontpage, so not a big problem, but i will investigate some more to make this work properly.

Kristof Coomans

Wednesday 05 November 2008 12:45:59 am

Hi

The problem was fixed by introducing a new enhancement. See the issue report for more details. Maybe the best solution is to backport this enhancement to your installations. Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 15:16:12
Script start
Timing: Jan 18 2025 15:16:12
Module start 'layout'
Timing: Jan 18 2025 15:16:12
Module start 'content'
Timing: Jan 18 2025 15:16:13
Module end 'content'
Timing: Jan 18 2025 15:16:13
Script end

Main resources:

Total runtime0.9941 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 588.0391152.6406
Module start 'layout' 0.00430.0024 740.679739.4766
Module start 'content' 0.00660.9859 780.1563647.6172
Module end 'content' 0.99250.0015 1,427.773416.1250
Script end 0.9941  1,443.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2843160.0002
Check MTime0.00120.1218160.0001
Mysql Total
Database connection0.00060.057810.0006
Mysqli_queries0.940694.6163700.0134
Looping result0.00060.0576680.0000
Template Total0.968897.520.4844
Template load0.00150.154120.0008
Template processing0.967397.301620.4836
Template load and register function0.00020.016310.0002
states
state_id_array0.00060.056410.0006
state_identifier_array0.00060.065120.0003
Override
Cache load0.00130.1326370.0000
Sytem overhead
Fetch class attribute can translate value0.00060.060240.0001
Fetch class attribute name0.00100.100180.0001
XML
Image XML parsing0.00150.147640.0004
class_abstraction
Instantiating content class attribute0.00000.001490.0000
General
dbfile0.00110.1143230.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs