Needs review
Project:
Lightbox2
Version:
6.x-1.11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2010 at 16:10 UTC
Updated:
28 Nov 2012 at 15:06 UTC
Jump to comment: Most recent file
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 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 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 commentedThank you, works perfectly.
Comment #4
JaHoLa commentedThanks, the solution from lonespy works for us.
Comment #5
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.