flvPlayer path and i18n bug
bgm - February 12, 2009 - 21:00
| Project: | jQuery Media |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
In jquery_media.jq.inc, function _jquery_media_add(), the use of url() in the following code causes problems on multi-lingual sites:
if (!($default_js_loaded || isset($defaults['flvplayer'])) || $options['flvplayer']) {
$defaults['flvplayer'] = $options['flvplayer'] ? url($options['flvplayer']) : url(variable_get('jquery_media_flvplayer', JQUERY_MEDIA_FLVPLAYER_DEFAULT));
$js .= " $.fn.media.defaults.flvPlayer = '{$defaults['flvplayer']}';\n";
}In the above, the url() transforms, for example, "flvplayer.swf" to "/en/flvplayer.swf". i.e. the resulting html in the page is:
$.fn.media.defaults.flvPlayer = '/en/player.swf';What's the best way to solve this?
Thanks,
mathieu

#1
subscribing, i've got the same issue with using i18n 6.x-1.0
#2
Damn... I just noticed this.
It wasn't happening on my site 3 months ago, now it is.
Anyway, I partially solved the problem by putting the full absolute path to the player into the jquerymedia settings page.
That's a pain, because nothing else on the site needs an full absolute path, but it seems to work ok.
The important thing is that the link in the content to the media file can still be 'partial absolute' Eg. /sites/default/files/
#3
I think this is duplicate of #244494: Incorrect path to default players when using i18n. Its issue for D5 - however its still relevant.
Here its explained more exactly.
#4
anyone know how to fix this? I've tried everything...
#5
I haven't check recent versions of the module, but replacing the use of url() by file_create_url() should do the trick.
matt