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

aaron’s picture

Status: Active » Fixed

thanks cityreader, got that committed!

Status: Fixed » Closed (fixed)

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