When user manually changed classes for media image button "Disable richtext editor" becomes non working with errors to console

Uncaught TypeError: Cannot read property 'value' of undefined
in line 266 of wysiwyg-media.js

This code will work
<img class="media-image img__fid__15731 img__view_mode__media_large attr__format__media_large" src="">

This, not
<img class="media-image src="">

Uploading a patch that fixes this.

CommentFileSizeAuthor
#5 attribution.png64.75 KBpodarok
media_fix.patch658 bytespodarok
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

podarok’s picture

Status: Active » Needs review
jwilson3’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2400455: How to use the CKEditor Image2 (enhanced image) plugin

This patch works as expected and actually resolves some very confounding issues we were experiencing developing media module integration with with CkEditor Image2 plugin, where captions were getting stripped out when the node was being saved.

  • aaron committed 480bdb8 on 7.x-1.x
    Issue #2428005 by podarok: fixed UX bug, Cannot read property 'value' of...
aaron’s picture

Status: Reviewed & tested by the community » Fixed
podarok’s picture

Status: Fixed » Needs work
FileSize
64.75 KB

@aaron - It would be nice to set git credits for the user, that actually fixed an issue.
There is a helpful window already provided within every issue at the bottom.

Only local images are allowed.

Thanks.

jwilson3’s picture

fyi, Git commit message says: "Issue #2428005 by podarok:"

What more did you want?

RedEight’s picture

I believe podarok is refering to http://cgit.drupalcode.org/media/commit/?id=480bdb8 having author set as "Unknown" rather than him.

Dave Reid’s picture

Status: Needs work » Fixed

@podarok: Hopefully you can excuse someone who was in his last weeks of life, suffering from ALS from properly attributing in Git: https://www.drupal.org/node/2444367

podarok’s picture

EDIT. Heh. I'm sorry then. My condolences

Status: Fixed » Closed (fixed)

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