Forums / Developer / Flash ok in development but not in live...what is missing?

Flash ok in development but not in live...what is missing?

Author Message

Angeliki Shearstone

Monday 29 June 2009 6:12:37 am

hello,

I am having problems displaying Flash elements. I have several pages which should display a flash banner.

We have two servers. One for development and then one for production. We amend the templates and styling in development and then we move into production. We edit the content straight in prodcution.This works fine in our development server but displays a blank Flash area in our live production server.
There is obviously something missing from the production server but what could that be???

Any ideas?

John Moritz

Monday 29 June 2009 6:17:31 am

Maybe you missed to set permissions on .htaccess file for the Flash-Folder?
I had similar problems with the Online Editor and javascript. I fixed this on the htaccess file.

Christian Rößler

Monday 29 June 2009 6:23:06 am

Hy,

1st guess:

Perhaps there are some differences between your development .htaccess and your production .htaccess ?
Do you use url rewriting? if so, dont forget to enable swf/flv files as well. Below is the default .htaccess:

RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

.

2nd guess:
Some kind of weird caching is active on the prod-server. When uploading new templates / ini-files make shure to clear the cache in order get the latest 'results'.

3rd guess:
Some overrides may be wrong or 'gone missing' during staging from dev to prod. Check the errorlogs after clearing the cache and viewing the page again.

If none of the above guesses fit, maybe consider enabling debug-mode and/or review the ezPublish errorlog or apache-log if necessary. Do you get any further error messages or is 'the part where the flash should go' empty ?

cheers,
christian

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Seb gaillard

Monday 29 June 2009 9:10:36 am

What's your ez publish version?

Angeliki Shearstone

Tuesday 30 June 2009 2:08:06 am

Hello,

thanks for your replies. Unfortunately it's not the chaching. I am using eZPublish version 4.0.1 with eZFlow.

I have asked our IT team to check the .htaccess file and the errorlogs.

The weird thing is that our IT department can see it in production, they can see it in the external PC but nobody else can see the flash and I cannot see it from home either. The file is there, if I copy the path to it in a new browser window it works.

Jon Staines

Tuesday 30 June 2009 9:41:18 am

I had a similar problem a week or two ago in that I could see the flash if I went to the file directly but not when it was in a page and ended up fixing it with the inline.diff file in this bug report: http://issues.ez.no/13783

This seems to change the Content-disposition and allow it to be displayed as part of a page. I've no idea why your IT department can see it fine though so it might not be the same problem.

Akhilesh Singh

Wednesday 01 July 2009 3:33:37 am

HI
u can start checking by Flash is enabled or not where u r checking it.
As your IT team can see the flash in production server .
and if its is enabled u can ask to your IT team to check the path
of flash file called in your site as may be there are chances it may be called from the server of which you
dont have access thats y at your end you r unable to see flash.

Angeliki Shearstone

Thursday 02 July 2009 5:47:04 am

Hi, we found out that if you have Flash Player 10 installed you can't see the flash bit. If you are using earlier version of Flash then it displays fine. That is if it is embedded in a page. If you see the flash bit separate on it's own then it's OK.

It might be something to do with what you've said Jon.

I''ll check that but it might be the eZPublsih code which needs updating to be compatible with the new Player 10.

Jon Staines

Thursday 02 July 2009 7:21:02 am

That would make sense if your IT department didn't have Flash 10.

Hope the code change fixes it for you.

Angeliki Shearstone

Monday 13 July 2009 7:37:55 am

Hi Jon,

I am not too sure I understand what i need to do with the inline.diff file. Do I need to copy paste its contents into settigns/file.ini ??

I am totally confused.

Jon Staines

Monday 13 July 2009 8:11:52 am

First thing to do is backup the files that will be altered just to be safe. So look in the inline.diff and see the files that it works on. In this case they are:

kernel/classes/binaryhandlers/ezfilepassthrough/ezfilepassthroughhandler.php
settings/file.ini

As this is a small diff file you could always make the changes by hand. This way at least you are aware of everything that goes on. The diff file contains lines beginning with + or -, a + means the line is added and a - means that the line is removed. Using the numbers on the lines beginning @ and lines that don't have either a + or - at the start, find where the code is to change. For example:

@@ -86,7 +86,10 @@
      header( "Content-Length: $contentLength" );
      header( "Content-Type: $mimeType" );
      header( "X-Powered-By: eZ Publish" );

Means that line 86 should be:

      header( "Content-Length: $contentLength" );

Once you are in the right part of the file use the + and - lines. For example:

-            header( "Content-disposition: attachment; filename=\"$originalFileName\"" );
+
+            $dispositionType = self::dispositionType( $mimeType );
+            header( "Content-disposition: $dispositionType; filename=\"$originalFileName\"" );

Means to remove the line:

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

and in its place put:

           $dispositionType = self::dispositionType( $mimeType );
           header( "Content-disposition: $dispositionType; filename=\"$originalFileName\"" );

The alternative (quicker) method is to use the patch command on a Linux/Unix system. For this you could put the inline.diff file in the eZ Publish root directory and run:

patch -Np0 -i inline.diff

This should do the changes for you.