If i use "colorbox file" on /admin/config/media/file-types/manage/image/file-display/media_large page and set both presets to preview and original in all configurations. It does not show image in any configuration - it shows media's default image ro shows "forbidden" text, but not my images.
I'm using Russian language on that site. Does it matter?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | screen capture 2012-1-19-13-59-30.png | 101.27 KB | fasdalf@fasdalf.ru |
Comments
Comment #1
kmadel commentedDid you configure the preview and original configurations? With at least the image file itself displayed with an Image Style?
Comment #2
fasdalf@fasdalf.ru commentedI have attached screenshot. What's wrong?
Comment #3
kmadel commentedBeta 1 fixes this issue. There were a few issues with using the formatter along with Media WYSIWYG plugin. The WYSIWYG Media plugin uses a custom input filter to convert the data that gets embedded in a text area to an actual rendered file entity. By default, the Drupal hook_filter_info turns on caching by default. When the output of an input filter is cached, the hook_field_formatter_view nor the theme function/theme template get called, so any JavaScript/JavaScript settings that get added in any of those places will not be added.
Therefore, I move the media_colorbox.js addition to the .info file - so it is loaded for every page - if anyone knows a better way, I am all ears (and Meda not caching the input filter output is not a good idea). I converted the settings (just initialHeight and initialWidth right now) to data attributes that will be stored as part of the cached rendered output.