Handler not work properly with dailymotions urls in format http://www.dailymotion.com/video/[video_id], for example http://www.dailymotion.com/video/xdlxym
It happens because wrong regexp pattern in _video_embed_dailymotion_get_video_id().

Comments

afi13 created an issue. See original summary.

afi13’s picture

I created patch for fix this issue, please review and test it.

afi13’s picture

I created patch for fix this issue, please review and test it.

afi13’s picture

Status: Active » Needs review
beder’s picture

thx for that patch, but it doesn't work for me.
I also tried with
'@dailymotion\.com/video/([_A-Za-z0-9-.]+)@i',
because my URL contains _ and - , but with no effect...

proteo’s picture

I think that a much better approach is used here, which also enables the use of newer DailyMotion URLs:

https://www.drupal.org/project/video_embed_dailymotion/issues/2900403

Porting the patch to 7.x is trivial:

function _video_embed_dailymotion_get_video_id($url) {
  preg_match('/^https?:\/\/(www\.)?(dailymotion.com|dai.ly)\/(embed\/)?(video\/)?(?<id>[a-z0-9]{6,7})(_([0-9a-zA-Z\-_])*)?$/', $url, $matches);
  return isset($matches['id']) ? $matches['id'] : FALSE;
}
mably’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is EOL

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.