Hi,

I just had an issue with the path prefix in a translated site I made. The problem was that the path to the player file was '/en/sites/all/themes/themename/player.swf', but it had to be '/sites/all/themes/themename/player.swf'.

The problem is in the url function that creates the path to the player that prepends the language prefix to the path. While it is a fixed path, set by the user, or the base path, my believe is that the url function is not needed here.

When I removed it, it all worked fine again.

I've included my patchfile to this post.

Comments

This patch has error. It should be
$js_settings['flvPlayer'] = $base_url."/".check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));
instead of
$js_settings['flvPlayer'] = check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));

patch fix the problem for me. :D

update: Sorry, it work only in front page.. :-P
I have change the patch and now works for all urls:

global $base_url, $base_path;
$js_settings['flvPlayer'] = $base_url.$base_path.check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));

Thank you, works perfectly.

Thanks, the solution from lonespy works for us.

Status:Active» Needs review
StatusFileSize
new628 bytes

Neither of the above worked for me with a multisite path-based install. Made a minor change and the attached patch sorted the issue for me.