I'm getting strange a strange issue after upgrading to SWFTools 6.x-2.2.

Swfobject seems to be getting passed file paths that contain "index.php?q=" which seems to be leading to function calls like the following for the test on SWF Tools status:

swfobject.embedSWF("/r2/index.php?q=sites/all/modules/swftools/shared/swftools_test_file.swf", "swfobject2-id-12367964791", "150", "150", "7", "", { "width": "150", "height": "150" }, { "swliveconnect": "default", "play": "false", "loop": "false", "menu": "false", "quality": "autohigh", "scale": "showall", "align": "l", "salign": "tl", "wmode": "opaque", "bgcolor": "#FFFFFF", "version": "7", "allowfullscreen": "true", "allowscriptaccess": "sameDomain", "height": 150, "width": 150, "base": "/r2/files/", "src": "/r2/index.php?q=sites/all/modules/swftools/shared/swftools_test_file.swf" }, { "id": "swf12367964791" });

The same thing happens when I attempt to embed FLV and mp3 files:

<object width="240" height="180" type="application/x-shockwave-flash" id="swf12367970541" data="/r2/index.php?q=sites/all/modules/swftools/shared/flash_media_player/player.swf"><param name="swliveconnect" value="default"/><param name="play" value="false"/><param name="loop" value="false"/><param name="menu" value="false"/><param name="quality" value="autohigh"/><param name="scale" value="showall"/><param name="align" value="l"/><param name="salign" value="tl"/><param name="wmode" value="opaque"/><param name="bgcolor" value="#FFFFFF"/><param name="version" value="7"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="sameDomain"/><param name="width" value="240"/><param name="height" value="180"/><param name="base" value="/r2/files/"/><param name="src" value="/r2/index.php?q=sites/all/modules/swftools/shared/flash_media_player/player.swf"/><param name="flashvars" value="width=240&amp;height=180&amp;file=http://streaming.osu.edu/mediawww/digitalunion/ResearchOnResearch.flv"/></object>

When I copy the code and remove the "index.php?p=" from the paths, everything works fine.

I cannot seem to figure out how an why the paths are suddenly including "index.php?q=" whereas they did nothing of the sort prior to the upgrade from 6.x-2.1. I've made no configuration changes other than upgrading the module.

Comments

zooney’s picture

Okay, an update here...

I was mistaken. I was previously running 1.3 and not 2.1. So I didn't downgrade far enough.

But, regardless, upgrading from 1.3 to 2.1 causes the problem.

Here's what's going on:

-I'm running Drupal 6.10 on Windows 2003/IIS 6.0.
-I have SWFTools 6.x-1.3 installed with SWFobject 2.1 and JW player 4.3 installed and enabled and SWFobject 2 is my default embed method

-With SWFTools 6.x-1.3, calls to swfobject.embedSWF contain working file paths
-After upgrading from 6.x-1.3 to 6.x-2.2, paths to both the JW player and files to be played therein contain "index.php?q=" which causes the embedded media to break completely since the paths are incorrect.

For example:

http://mywebsite.com/sites/all/modules/swftools/shared/flash_media_player/player.swf in 6.x-1.3

becomes

http://mywebsite.com/index.php?q=sites/all/modules/swftools/shared/flash_media_player/player.swf in 6.x-2.2

...and therefore the both the player and media are not found.

My inkling is that this has something to do with 6.x-2.2 using an Apache specific environment variable or something of that sort. It's difficult to tell at this point.

Workaround: temporarily downgrade to 1.3

Stuart Greenfield’s picture

Oops! I'll hold my hand up - I changed the code so it produces relative url's rather than absolute ones (it seemed like a good idea). But I forget to test using "non clean" urls - I am guessing that the way the relative url's are being produced is interfering with the urls on sites that don't use ?q= style urls.

I'll reverse the change for now, and make a new release so that it starts working again.

I want to overhaul the entire way that urls are produced in SWF Tools, and someone else has reported issues with sites that use multiple languages.

Stuart Greenfield’s picture

Status: Active » Fixed

OK - new release is out that reverses this bug. I retested locally using non-clean urls and it seems to be ok again now. Sorry about that!

zooney’s picture

Okay great thanks...

...it's all fine and working now.

Odd thing though, it seems that the test animation on the SWF Tools status page is still putting "index.php?q=" into the url. Is that hard coded in?

Stuart Greenfield’s picture

Hmm, thanks for the pointer - I'll look in to it!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.