Closed (fixed)
Project:
Embedded Media Field
Version:
6.x-1.12
Component:
Embedded Video Field
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2009 at 05:15 UTC
Updated:
3 Dec 2009 at 16:40 UTC
Thanks for this powerful module. My problem is that after I added a cck emvideo field to a customized content type and opened a provider named "Tudou", I fail to create a new video node with desperated error information: You have specified an invalid media URL or embed code.
After debugging, my conclusion is RegEx pattern in emfield/contrib/emvideo/providers/tudou.inc file need a little adjust.
function emvideo_tudou_extract($embed = '') {
// http://www.tudou.com/programs/view/uprLNXyEGpc/
// <object width="400" height="300"><param name="movie" value="http://www.tudou.com/v/uprLNXyEGpc"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><embed src="http://www.tudou.com/v/uprLNXyEGpc" type="application/x-shockwave-flash" width="400" height="300" allowFullScreen="true" wmode="transparent" allowScriptAccess="always"></embed></object>
return array(
'@tudou\.com/programs/view/([^"\&/]+)@i',
'@value="http\://www\.tudou\.com/v/([^"\&/]+)@i'
);
}
change this line
'@value="http\://www\.tudou\.com/v/([^"\&/]+)@i'
into:
'@tudou\.com/v/([^"\&/]+)@i'
and it is really working now.
P.S: I find a few issues which maybe also confuse users with error information: "You have specified an invalid media URL or embed code".
Maybe also this kind of problems is raised from the RegEx pattern in its corresponding provider file.
Comments
Comment #1
aaron commentedthanks cityreader, got that committed!