When using path based language negotiation in i18n, emvideo custom url puts a language prefix on the filepath, e.g

sites/default/files/videos/sample.flv

becomes

ja/sites/default/files/videos/sample.flv

The result is a 403 for all videos :-(

The attached patch fixes the issue by using the 'external' flag and applying the base_path when generating the $url path to the video file.

Tested and working from here, needs review.

DT

CommentFileSizeAuthor
zzz_custom_url.inc_.patch606 bytesdavidwhthomas

Comments

aaron’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Status: Needs review » Fixed

commited, thanks @davidwhthomas! (i didn't test myself against i18n, so please re-open if it's still an issue...)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alex ua’s picture

Status: Closed (fixed) » Active

I'm reopening this, as it seems to have caused this issue: #920722: Custom URL Emvideo Path Error

Anonymous’s picture

I also seem to have this problem, or a variant.

It worked fine in 6.x-1.18 with the custom video path set to sites/default/files/uploads/common/downloads/example.flv (Forgive my tortuous file structure.)
Looking at the Net trace in Firebug this fetches http://www.letchwortharts.org/sites/default/files/uploads/common/downloa... directly and happily runs the video.

In 6.x-1.25 the same path is instead translated to http://freevideocoding.com/sites/default/files/uploads/common/downloads/... which of course does not exist.

I see that there is code in zzz_custom_url.inc which can prefix the path (after some processing I don't understand) with http://freevideocoding.com/flvplayer.swf?file= but I don't see how that can be generating the call logged above.

Any help welcome.
Regards, Tony.

Anonymous’s picture

A bit more (should have looked closer last time) ...

The effect above is because the source of the page is being rendered as:

in v1.18: src="http://freevideocoding.com/flvplayer.swf?file=http://test.letchwortharts..."

in later versions: src="http://freevideocoding.com/flvplayer.swf?file=sites/default/files/upload..."

The original URL entered in the page is "sites/default/files/uploads/common/downloads/loushotter.flv", so somewehere the processing of this to an absolute format has been lost after v1.18.

Tony

ball.in.th’s picture

I just ran into a similar problem in 6.x-1.26 -- video urls have a '/' in front of the http://. Comment out $url = $base_path.$url (line 125), as in http://drupal.org/node/920722#comment-3525864 , fixed my problem.