Trying to insert a Youtube video into the body content of a node. The link is https://www.youtube.com/watch?v=BCYRbQgO-a0

All I'm doing is pasting the video link into the Web tab of the Media browser. Very briefly I see the following message (also available in logs)

"File youtube://v/BCYRbQgO-a0 could not be copied, because the destination directory public://v is not configured correctly."

I can then see the thumbnail, but pressing submit doesn't insert the video into the CKEditor window. I've checked the mimetypes and everything seems in order.

Comments

mokargas’s picture

Creating a /v folder in sites/default fixed the copy issue, however the video is now embedded as a link, irregardless of file display settings under admin/structure/file-types/manage/video/file-display/

mokargas’s picture

More issues: Inserting a video produces the following text, wrapped in a div:

Video of XfPKKisE88w if I select the Original file display mode. If I select WYSIWYG or Default, an empty div is inserted.

The actual Media tags are never inserted.

Devin Carlson’s picture

Component: User interface » Code
Category: Bug report » Support request
Status: Active » Fixed

I'm not able to duplicate this on a fresh install of the latest -dev release.

Status: Fixed » Closed (fixed)

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

aperedos’s picture

I have this problem too. I can upload images succesfully but when i try to upload a youtube video with an url...Drupal give me the same error as Mokargas.

I review Apache´s permissions and i have 777 from sites/default/files, also my tmp folder is inside of this public directory.

What happens?

Regards.

aperedos’s picture

Status: Closed (fixed) » Active
lias’s picture

I am also experiencing this exact issue and the directory error.

I looked at this issue https://www.drupal.org/node/2579459 to see if filefield paths was the culprit but turned off for that field and still have this problem which only displays the Youtube title and icon and errors in the log.

The preview and full display are no longer working for new posts using Media:Youtube to embed.

lias’s picture

I am not having issues with actual files being uploaded to the Drupal 7 site using the tmp directory or the files directory. It only seems to be an issue with this module's use of the directories.

File youtube://v/kEFF2XRLrOw could not be copied, because the destination directory is not configured correctly.

When I delete the post with the media:youtube file I get this in my system log:

The specified file /tmp/test_-6221_-My Place could not be deleted, because it is not a valid URI. More information is available in the system log.

The temporary file that is uploaded by media:youtube to the tmp directory has no extension and is just a File. The working uploads have file extensions of .tmp