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?

Comments

kmadel’s picture

Version: » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Did you configure the preview and original configurations? With at least the image file itself displayed with an Image Style?

fasdalf@fasdalf.ru’s picture

StatusFileSize
new101.27 KB

I have attached screenshot. What's wrong?

kmadel’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1
Category: support » bug
Status: Postponed (maintainer needs more info) » Fixed

Beta 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.

Status: Fixed » Closed (fixed)

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