Getting warning messages throughout the site (I'm running drupal 6-1.5), saying:
warning: Missing argument 5 for emvideo_modal() in site directory/modules/emfield/contrib/emvideo/emvideo.module on line 604.
warning: Missing argument 6 for emvideo_modal() in site directory/modules/emfield/contrib/emvideo/emvideo.module on line 604.
line 604 in emvideo.module reads:
function emvideo_modal($nid, $width, $height, $field_name, $provider, $code, $extra = NULL) {
$field = array();
$field['widget']['video_width'] = $width;
$field['widget']['video_height'] = $height;
$field['widget']['video_autoplay'] = 1;
$field['field_name'] = $field_name;
$node = node_load($nid);
// If the URL has an extra bit, then append that to the video code.
// This broke shadowbox, which needs index.php to register as iFrame.
if (isset($extra) && ($extra != 'index.php')) {
$code .= '/'. $extra;
}
foreach ($node->{$field_name} as $video) {
if ($video['provider'] == $provider && $video['value'] == $code) {
$item = $video;
}
}
Any help would be greatly appreciated.
Comments
Comment #1
blasthaus commentedsubscribing, same issue
Comment #2
merryfknpoppins commentedI am seeing the same error on 1.9. Anyone have any idea on what is causing this?
Comment #3
jaarong commentedsame two errors. The play button also shows up in the center of my content.
Comment #4
pedrosponly visible after adding media modules, same pb
suscribing
Comment #5
mattcasey commentedalmost same but it's line 661 for me, and for some reason a Video is trying to load when I display the CCK field in a pane, but it's empty.
*UPDATE* I found that changing the Field Formatter fixed the issue. The red errors are gone, but sometimes the video player loads even though there's no link.
Set it to simply "Preview Video", or "Image Thumbnail->Full Size Video", towards the end of the list, and everything is okay. This is the thumbnail set in the CCK field.
Set it to "Video_thumbnail->Full Size Media", and the issue comes back.
Comment #6
hedac commentedthanks
yes I have this issue too.. not allowing me to properly use an imagecache preset for displaying video previews. I like to use an imagecache preset to crop the black bars to a 16:9 ratio from the preview file which is 4:3 proportion with black bars for most of current HD videos.
Comment #7
Anonymous (not verified) commentedI have these errors occurring on every cron run which is once at top of every hour:
"Missing argument 5 for emvideo_modal() in /home/******/public_html/sites/all/modules/emfield/contrib/emvideo/emvideo.module on line 661."
"Missing argument 6 for emvideo_modal() in /home/******/public_html/sites/all/modules/emfield/contrib/emvideo/emvideo.module on line 661."
Drupal 6.20
Emfield 6.x-2.4
Comment #8
rayasa commentedThis warning still appears in 6.x-1.26. I find that this happens when url's of the sort "http://example.com/emvideo/modal/<nid>/<width>/<height>/field_video_url" is accessed. Here, the trailing arguments 5 and 6 is not provided.
Also, I find that only robots and crawlers access this sort of urls. Normal video node view/edit does not generate this warning.