Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Modules:
CKEditor 7.x-1.16
Media WYSIWYG 7.x-2.0-alpha4+11-dev
Steps:
1. Edit Body field of Content Type
2. Open Media Browser
3. Select Youtube video from library
4. Press Submit on last page of Media Browser
Javascript error:
TypeError: imgElement is undefined
Source: [...]/sites/all/modules/contrib/ckeditor/plugins/media/library.js?nfjstk
Line: 172
Code in question:
[...]
var imgElement = imgNode[0];
var sorter = [];
// @todo: this does not work in IE, width and height are always 0.
for (i=0; i< imgElement.attributes.length; i++) { // <-- line 172
[...]
imgNode is empty.
Since this works with plain images and only fails on yoube videos (probably other video types as well) I assume this is designed to only work with images?
Comments
Comment #1
leopathu CreditAttribution: leopathu as a volunteer and commentedit happens for Audio files too...
Comment #2
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedRecent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.
Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.
As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.
Thanks,
Media team