When using Panels, inserting media in a WYSIWYG text area doesn't work.
The following scenario requires the Media button to be enabled in your WYSIWYG config (I tested using CKEditor).
* Add a custom panel pane to a panel page.
* Click the 'Add media' button.
* Upload a file or find one in the library.
* Click submit.
Clicking submit should take you the file style config in the modal, but it doesn't in this case.
Not sure if this is caused by Media's WYSIWYG JS, or by Panels. I found a JS error in the console (see below), relating to CKEditor, so logging it here.
TypeError: defaults.src.replace is not a function (154 out of range 6)
Comment | File | Size | Author |
---|---|---|---|
#1 | media-panels_ckeditor_inline_image_fix-1901516.patch | 659 bytes | Lythimus |
Comments
Comment #1
Lythimus CreditAttribution: Lythimus commentedI'm having the same issue. This is a hack, but it works.
Comment #2
agoradesign CreditAttribution: agoradesign commentedI'm not using Panels, but also had the problem. Interestingly, it appeared suddenly, without doing any updates, etc before. The only thing I had changed, was the file_entity.tpl.php and a theming function from Media Colorbox - both should normally have nothing to do with the media browser... But these were the only File/Media related changes I did in the last couple of weeks...
However, your patch helped me a lot! I totally agree with you, that this is some kind of a hacky solution, but it doesn't harm + the maintainer already is stating before the next line, that the following line is a hacky solution too:
Therefore I'd like to see this commited, until there's a better solution for finding the
defaults.src
in general. Any fears against this bugfix from anyone?Comment #3
brunodboPatch in #1 doesn't work for me. When I submit the media upload form, I get the message "The file was uploaded" in an otherwise empty modal.
Console shows the following:
Comment #4
ParisLiakos CreditAttribution: ParisLiakos commentedis that a dup of #1630288: Upload image freeze on wysiwyg integration with multi field media?
Comment #5
brunodboSame issue and errors yep. Marking as duplicate of #1630288.
Comment #5.0
brunodboFixing issue summary.