0

In Drupal 7, I am using panels/panelizer, media & media_youtube.

I have correctly set up my view mode for the Video file type, and have selected that view mode using 'Rendered entity' in my pane settings.

The video is rendering as a link to sites/default/files/[file youtube title].

The above problem is arising with a file field on a node, that is being rendered with panelizer. When I add a video using a fieldable panel pane, it renders correctly (using the same view mode).

Any help you could provide would be much appreciated.

<div class="field-video">
    <span class="file">
      <img class="file-icon" alt="" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png"> 
      <a href="http://sl-header.site.io/sites/default/files/F%2016%20Fighter%20Pilots%20over.F%2016%20Fighter%20Pilots%20over" type="application/octet-stream; length=0">F 16 Fighter Pilots.F 16 Fighter Pilots over</a>
    </span>
</div>
1

I was having the same problem. The YouTube video was added correctly using the Media browser, the thumbnail was generated and it was even saved in the database correctly prior to saving the node.

After the node was saved, the entry in the database changed to application/octet-stream with a filename of the description twice, as well as a URI of public://

Something was altering the file details when the node was being saved. There weren't many options I could think of, and a quick review of the field settings revealed filefield_paths was enabled for the field, which was altering the filename.

I disabled fielfield_paths for the field and saved the node again, which resulted in the video displaying properly.

If you have filefield_paths installed, try disabling it for the YouTube field only.

Update: This is resolved in the latest version of filefield_paths. See: https://www.drupal.org/node/2576547

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.