Recently i've updated both VideoJS and CCK (VideoJS 6.x-1.7 , CCK 6.x-3.0-alpha3) after the update all videos are displayed twice! I tried to find the problem and noticed that the CCK is displaying the video twice because i have two files (mp4 & webm) attached to the custom field. Here is the output when i print the items variable in modules/cck/theme/content-field.tpl.php line 35:

<?php
<div class="field field-type-filefield field-field-video-640-360">
    <
div class="field-items">
    Array
(
    [
0] => Array
        (
            [
fid] => 555
           
[uid] => 7
           
[filename] => 6_normal.mp4
           
[filepath] => sites/default/files/videos/6_normal_1.mp4
           
[filemime] => video/mp4
           
[filesize] => 1907641
           
[status] => 1
           
[timestamp] => 1326098418
           
[list] => 1
           
[data] =>
            [
nid] => 125
           
[#delta] => 0
           
[view] => <div class="video-js-box 0" id="videojs-125-field-video-640-360">
  <
video id="videojs-125-field-video-640-360-video" class="video-js" width="640" height="360" controls="controls" preload="auto" poster="http://exmaple.com/sites/default/files/posters/6_0.jpg">
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4" type="video/mp4; codecs=&#039;avc1.42E01E, mp4a.40.2&#039;" />
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.webm" type="video/webm; codec=&quot;vp8, vorbis&quot;" />
    <
div class="vjs-flash-fallback"><div id='vjs-flash-fallback'  style="width:640px;height:384px;" class="flowplayer"></div></div>
    <
div class="vjs-no-video">
      <
strong>Download Video:</strong>
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4">MP4</a>,
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.webm">ATION/OCTET-STREAM</a>,
    </
div>
  </
video>
</
div>
            [empty] =>
        )
    [
1] => Array
        (
            [
fid] => 556
           
[uid] => 7
           
[filename] => 6_normal.webm
           
[filepath] => sites/default/files/videos/6_normal_1.webm
           
[filemime] => application/octet-stream
           
[filesize] => 2082726
           
[status] => 1
           
[timestamp] => 1326098431
           
[list] => 1
           
[data] =>
            [
nid] => 125
           
[#delta] => 1
           
[view] => <div class="video-js-box 0" id="videojs-125-field-video-640-360">
  <
video id="videojs-125-field-video-640-360-video" class="video-js" width="640" height="360" controls="controls" preload="auto" poster="http://exmaple.com/sites/default/files/posters/6_0.jpg">
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4" type="video/mp4; codecs=&#039;avc1.42E01E, mp4a.40.2&#039;" />
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.webm" type="video/webm; codec=&quot;vp8, vorbis&quot;" />
    <
div class="vjs-flash-fallback"><div id='vjs-flash-fallback-1'  style="width:640px;height:384px;" class="flowplayer"></div></div>
    <
div class="vjs-no-video">
      <
strong>Download Video:</strong>
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4">MP4</a>,
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.webm">ATION/OCTET-STREAM</a>,
    </
div>
  </
video>
</
div>
            [empty] =>
        )
)
        <
div class="field-item odd">
                    <
div class="video-js-box 0" id="videojs-125-field-video-640-360">
  <
video id="videojs-125-field-video-640-360-video" class="video-js" width="640" height="360" controls="controls" preload="auto" poster="http://exmaple.com/sites/default/files/posters/6_0.jpg">
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4" type="video/mp4; codecs=&#039;avc1.42E01E, mp4a.40.2&#039;" />
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.webm" type="video/webm; codec=&quot;vp8, vorbis&quot;" />
    <
div class="vjs-flash-fallback"><div id='vjs-flash-fallback'  style="width:640px;height:384px;" class="flowplayer"></div></div>
    <
div class="vjs-no-video">
      <
strong>Download Video:</strong>
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4">MP4</a>,
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.webm">ATION/OCTET-STREAM</a>,
    </
div>
  </
video>
</
div>
        </
div>
              <
div class="field-item even">
                    <
div class="video-js-box 0" id="videojs-125-field-video-640-360">
  <
video id="videojs-125-field-video-640-360-video" class="video-js" width="640" height="360" controls="controls" preload="auto" poster="http://exmaple.com/sites/default/files/posters/6_0.jpg">
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4" type="video/mp4; codecs=&#039;avc1.42E01E, mp4a.40.2&#039;" />
    <
source src="http://exmaple.com/sites/default/files/videos/6_normal_1.webm" type="video/webm; codec=&quot;vp8, vorbis&quot;" />
    <
div class="vjs-flash-fallback"><div id='vjs-flash-fallback-1'  style="width:640px;height:384px;" class="flowplayer"></div></div>
    <
div class="vjs-no-video">
      <
strong>Download Video:</strong>
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.mp4">MP4</a>,
      <
a href="http://exmaple.com/sites/default/files/videos/6_normal_1.webm">ATION/OCTET-STREAM</a>,
    </
div>
  </
video>
</
div>
        </
div>
        </
div>
</
div>
?>

Any idea why this is happening?

Comments

Status:Active» Postponed (maintainer needs more info)

If you make the following update to videojs.module and clear the Drupal cache, is the problem gone?

Search for: CONTENT_HANDLE_CORE

Replace by: CONTENT_HANDLE_MODULE

Status:Postponed (maintainer needs more info)» Fixed

Fixed in git.

Status:Fixed» Closed (fixed)

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

Hello,

You said it has been fixed but I have exactly the same problem: videos are displayed twice when I put 2 files for one field...
I tried to debug it seems that the field module split into different items.
Does someone have more explanations please ?!

With which version are you having this problem? Can I see the page with the two videos?

I think I found the problem: I'm using the module "video" and "video.js" and it makes some problem when you want to put different sources for the video.
I tried to use video.js only alone with file field and it works!
Maybe we can close this discussion, thanks for your response.