UPDATE: See #5 comment for instructions on how to get it working.
Original issue:
Sorry if this has already been reported (I made just a quick search).
What I'd like to discuss is the approach of how media inserts images into WYSIWYG editor. Excuse me for I may be totally wrong, but from what I observe by using CKEditor + media_wysiwyg, the workflow of inserting image is following:
- A user first selects an image from Media Library/Upload
- Then he configures which view mode to use
- Then image link is rendered (via image_create_url()) and inserted as plain HTML into WYSIWYG.
What does rendered link mean — is the presence of itok token which is calculated from:
- drupal private key
- salt
Both are totally site dependent and may easily change when a website is deployed.
So, if the above is correct, then what was the idea behind this workflow? Hoping that nobody will never change salt or key? I just don't get why not to just insert a stubs instead of rendered images and use corresponding input filter which (re)generates image links upon cache invalidation?
Thanks in advance
Comments
Comment #2
OnkelTem commentedComment #3
OnkelTem commentedComment #4
dave reidIt should be storing a token internal to Media which is then converted to the file output in the filter. Can you check what is the actual text stored in the database for the embedded image?
Comment #5
OnkelTem commented@Dave Reid
Okay, I see now. What I was describing was related to... the previous behavior of Media + CKeditor. And after you've mentioned the input filter (of which I was not even aware of) I began my own "enquiry" which ended up only now with the resolution: it works and absolutely like I was dreaming of in the issue summary and even much more (instant CKEditor visualization).
Well, I can say that all these matters are actually over-complicated - versions, plugins, additional modules. I see its clear now that for a mortal its about to impossible to pave the way through all the complexities (And I've got an insight that they (mortals) basically use some old good versions of Media and CKEditor and don't even bother in the latest gains of drupalers geeks engineries) This is not a blast, just a statement of the fact.
For those who want to get new and right Media + CKEditor integration working, follow the instructions:
1) Update Media to #844baf+ (this is a git commit id)
2) Update CKEditor to #32f097+
3) Apply database updates and rebuild registry (
drush rr; drush updatedb)4) Install a new module Media CKEditor (of which you had no idea before and on which nothing would even hint to)
5) Enable all above and Media WYSIWYG module.
6) Now configure CKeditor profile to enable both the button for inserting Media files and "Plugin for embedding files using Media CKEditor" checkbox under "Editor Appearance" - this is a new name for the plugin.
HTH.
Sorry for the misleading issue. I think now it's done.
Comment #6
OnkelTem commentedComment #7
ron collins commented@OnkelTem: Thanks. I bashed my head against this for a few hours last week until I follow your instructions. Might be worth linking in the release notes?
Comment #8
Mark_L6n commentedFYI for confused site builders: I listed a few approaches that could be taken now to get around this problem at Remove Media integration.