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.
Videos that used to open in lightbox and play without problem do not start playing after upgrade from 6.x-1.9 to 6.x-1.10. See example on home page of this test site:
http://nexuszone.som.yale.edu/design-selco/
I believe the local Drupal player file is no longer opening -- the path to the video still seems fine, and will play using a browser plugin with lightbox disabled. Reverting back to 6.x-1.9 fixes whatever the prroblem is.
Walter
Comment | File | Size | Author |
---|---|---|---|
#3 | lightbox2_11.patch | 449 bytes | wlmullen |
Comments
Comment #1
wlmullen CreditAttribution: wlmullen commentedI tracked down the "problem" to line 681 in lightbox2.module.
$js_settings['flvPlayer'] = url(check_plain(variable_get('lightbox2_flv_player_path', '/flvplayer.swf')));
If I remove the url(), the local flashplayer is found and the video plays in a lightbox as before.
Comment #2
wlmullen CreditAttribution: wlmullen commentedAfter looking through the Api for url() at
http://drupal.org/node/872340
there is a comment entitled "Don't use url() to generate JS and CSS paths," which seems to apply to my issue with Lightbox2. Following a solution described at
http://drupal.org/node/872340
I changed line 681 in lightbox2.module to:
$js_settings['flvPlayer'] = base_path() . check_plain(variable_get('lightbox2_flv_player_path', '/flvplayer.swf'));
This works, and should address any securtiy concerns about relative paths. Next I'll test with 6.x-1.11 and the change works there, I'll post a patch.
Comment #3
wlmullen CreditAttribution: wlmullen commentedThis patch changes the $js_settings['flvPlayer'] setting to use base_path() and not url() in the lightbox2.module file in version 6.x1.11 of lightbox2. It fixes file not found issue with custon flash player paths entered through the lightbox2 configuration interface.
Would appreciate suggestions on better solutions!
Comment #4
jlbretton CreditAttribution: jlbretton commentedMany thanks Walter.
I confirm this correct the file path bug in 6.x-1.11.
Comment #5
m4oliveiThanks Walter.
This fix corrects the same issues I was having in 6.x-1.11. In my case I have an English/French Drupal site and /fr was being added to the path to the player making it so that videos did not play on the French side of the site. The url() function is what is adding that path prefix. Using base_path() instead is definitely the way to go IMO.
Thanks,
Matt
Comment #6
goldlilys CreditAttribution: goldlilys commentedThis only fixes one part of the error.
Instead of
/sites/default/files/mediaplayer/player.swf?file=http://example.com/files/flash/video.flv
it should be
/sites/default/files/mediaplayer/player.swf?file=/files/flash/video.flv
I firebugged the second part and this way, the video works. What else to change for the second part to work?