i'm update media module.
upload multiple file work's fine from fileField but from ckeditor isn't work,
i have code the work on release 2.0 but now is get error this:

Uncaught TypeError: Cannot read property 'length' of undefined
at Object.create_element (media_wysiwyg.filter.js?ous6lj:220)
at Object.insert (wysiwyg-media.js?ous6lj:143)
at i (jquery.min.js:4)
at Object.success (wysiwyg-media.js?ous6lj:123)
at c (jquery.min.js:4)
at Object.fireWith [as resolveWith] (jquery.min.js:4)
at k (jquery.min.js:6)
at XMLHttpRequest.r (jquery.min.js:6)

attach patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

israel dahan created an issue. See original summary.

joseph.olstad’s picture

Status: Active » Needs work

Hi Israel, please note that for making correctly formatted patches that you have to clone the drupal project (in this case media)
like this:

git clone --branch 7.x-2.x https://git.drupal.org/project/media.git

cd media

and modify the code as desired then generate the patch from that. Because currently in your patch I see sites/all/modules/contrib etc
it's not going to pass testing this way because the testbot will not be able to apply this patch.

Furthermore, I looked at the code in question, I make this suggestion..

Suggest changing this line
if (media_files.length > 1) {

to:
if (typeof media_files.length != 'undefined' && media_files.length > 1) {

Try that and see if it helps?.

Otherwise, I'm not sure if I understand your use case but it sounds interesting.
Thanks.

joseph.olstad’s picture

Title: multiple file isn't work from Wysiwyg (ckesitor) » multiple file isn't work from Wysiwyg (ckeditor)
Status: Needs work » Postponed (maintainer needs more info)
israel dahan’s picture

Version: 7.x-2.10 » 7.x-2.11
Issue tags: +multiple images, +multiple select, +ckeditor, +wysiwyg, +media wysiwyg
israel dahan’s picture

FileSize
5.28 KB

ok let's look.
this problem it's happen on the installation media + wysiwyg + ckeditor.
you can't choice multiple files and join them to text area.
this patch resolve this issue.

i'm patched the media-2.11.

this is reference the older issue https://www.drupal.org/node/951004

Chris Matthews’s picture

Version: 7.x-2.11 » 7.x-2.x-dev
Status: Postponed (maintainer needs more info) » Closed (outdated)
Issue tags: -multiple images, -multiple select, -ckeditor, -wysiwyg, -media wysiwyg

Recent 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

kyoder’s picture

Status: Closed (outdated) » Active

I can confirm that this is still an issue with the latest stable release 7.x-2.24 and with 7.x-4.0-beta3.
At least with ckeditor and the wysiwyg module, it is not possible to upload multiple files at once inside the wysiwyg using the media button.
Enabling media_bulk_upload and it's dependencies (plupload and multiform) does not help.

Looking through the responses to this ticket and other reports of this issue, it's not even clear to me whether this is supported functionality.
Are we supposed to be able to upload multiple files inside the wysiwyg?