SWF-Tools doesn't work on multilingual sites: wrong path to mediaplayer.swf:
website.com/de/modules/swftools/shared… instead of
website.com/modules/…

Comments

Stuart Greenfield’s picture

Blimey - the SWF Tools issue queue is getting busy, and there are all sorts of interesting little things cropping up! Guess it means the module is reasonably popular though, so I should treat that as positive :-)

I've never worked with multilingual sites, but at the moment I have some thoughts about overhauling the way that SWF Tools constructs its url's. So your report is very timely as I can build this in to the revised code, and it makes an extra incentive to fix it.

Unfortunately I'm busy at work, and about to go on vacation, so I'm not sure how long this will take to get fixed, but I'll do my best!

faunt’s picture

I'm noticing a (possibly related) problem while trying to modify path to players through File Handling settings. Default directory doesn't work on my install, as I am not using aliased urls, and SWF Tools path queries can't seem to overcome this (i.e. in Reports > SWF Tools Status, the Flash tester swf can't be found as it's looking for the file in myurl.com/?q=modules/swftools/shared/swftools_test_file.swf instead of myurl.com/modules/swftools...)

What's worse, changing default directory through SWF Tools > File Handling > File Locations panel doesn't seem to have any positive effect. No matter the directory (subdirectory within files; writing in correct /modules/swftools/shared from root, with preceding slash), swf players can't be found, which is apparent in File Handling > File Handling tab.

Anyone have thoughts toward sol'n for non-aliased url sites? My install also happens to use i18n for translation, which is why I'm posting here...

Stuart Greenfield’s picture

I've not worked with the i18n module before - I quickly installed it and have a site running in two languages as a test, but the paths look ok and my content is working.

There seem to be a lot of options in the module, so can you let me know how you are uploading the content (regular upload, CCK, something else), and then how you are putting the content on the page (input filter, PHP)

I see that there's an option to synchronize files across languages - if I have that ENabled then I get the same files irrespective of language. If I have it DISabled then I get nothing in translated content (using regular file upload as a test).

@faunt - the ?q= was a bug in a release I put out - it's fixed in the newer releases!

Stuart Greenfield’s picture

Looking at this some more - for the specific case of the mediaplayers, the path constructor in version 6.x-2.2 used the url() function, which broke with i18n as the language prefix gets added.

It was url() that also caused the ?q= issue, when using non-clean urls.

But later versions of SWF Tools build paths in a different way, so shouldn't be affected.

If you are having problems with SWF Tools and i18n, what version of SWF Tools are you using?

Also, are you using clean or non-clean urls, and public or private downloads?

The routines for building filepaths in Drupal are a little bit tortuous, and there are a lot of possibilities that describe how a finished path might look!

Thanks!

Stuart Greenfield’s picture

Priority: Critical » Normal

Is this still an issue in DRUPAL-6--3? The path building mechanism has been re-written, so maybe it is fixed?! Not tested myself as I don't use i18n.