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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lonespy’s picture

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'), '/'));

hachreak’s picture

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'), '/'));
traveller’s picture

Thank you, works perfectly.

JaHoLa’s picture

Thanks, the solution from lonespy works for us.

Mirabuck’s picture

Status: Active » Needs review
FileSize
628 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.