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

CommentFileSizeAuthor
#3 lightbox2_11.patch449 byteswlmullen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wlmullen’s picture

I 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.

wlmullen’s picture

After 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.

wlmullen’s picture

Version: 6.x-1.10 » 6.x-1.11
FileSize
449 bytes

This 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!

jlbretton’s picture

Many thanks Walter.
I confirm this correct the file path bug in 6.x-1.11.

m4olivei’s picture

Thanks 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

goldlilys’s picture

This 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?