Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | Lightbox2-Fix_for_video_player_path_prefix-1005296-5.patch | 628 bytes | Mirabuck |
lightbox2.module.patch | 708 bytes | fabianderijk |
Comments
Comment #1
lonespy CreditAttribution: lonespy commentedThis 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'), '/'));
Comment #2
hachreak CreditAttribution: hachreak commentedpatch 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:
Comment #3
traveller CreditAttribution: traveller commentedThank you, works perfectly.
Comment #4
JaHoLa CreditAttribution: JaHoLa commentedThanks, the solution from lonespy works for us.
Comment #5
Mirabuck CreditAttribution: Mirabuck commentedNeither 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.