Active
Project:
Media Colorbox
Version:
7.x-1.0-rc4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2013 at 05:36 UTC
Updated:
16 Mar 2015 at 00:58 UTC
Jump to comment: Most recent
I believe the issue #1514406: Images display in the wrong size. was committed too hastily. My image file entities have several fields attached to them which were previously rendered in the colorbox modal. Now all image colorbox links go directly to the image and I miss out on all the other fields.
Comments
Comment #1
greg boggsThanks for the report mstrelan, I'm looking into it now. Seems easy enough to reproduce.
Comment #2
greg boggsComment #3
greg boggsI've confirmed this is not user error. I cannot get file fields to display either. I've also noticed that the media colorbox view mode in the default file display does nothing and you need to add an image view mode to the default display to get the image to display.
The release applies 4 inter-related patches, I'm experimenting now. If someone has more media experience than I can take a look that would be great.
Comment #4
mstrelan commentedThe issue is probably not really related to the media module, it's more that the colorbox is loading HTML, and the js doesn't known how to automatically resize HTML. This is worsened by the fact that often images in the colorbox will be using an image(cache) preset and therefore may not exist when the colorbox is first loaded. Even if it does exist it seems you get varying results depending on whether the browser has cached the image or not.
It seems to me we need to somehow force the browser to download the image before the colorbox is initiated. Either that or work out how to display the additional fields in the caption area of the colorbox.
My current workaround is to bind to cbox_complete, set a 500ms timer to allow for the image to download and then see if the colorbox can be resized. It's a bit jumpy as sometimes the colorbox resizes twice, I wonder if there is a better approach..
Comment #5
mstrelan commentedI wonder if this jquery library helps - https://github.com/desandro/imagesloaded
Comment #6
dave bruns commentedI was hoping to use media colorbox as a way to provide colorbox support to node gallery images (https://drupal.org/project/node_gallery). With just brief testing, I can easily get images to open in colorbox, but I can't get captions to work ( see issue here over at node_gallery: https://drupal.org/node/1913810)
Just to confirm, is this issue (2060073) the cause? Or should I be able to get captions to work with media colorbox?
Thank you for a useful module!
Comment #7
greg boggsCaptions work in the dev release. Also hover captions work in the latest media stable without media colorbox.
Comment #8
dave bruns commentedGreg - thanks for the reply. The readme is truncated in the Colorbox Captions section. At admin/config/media/file-types, what is it that needs to be done to enable captions?
Sorry if I'm missing something basic.
I'm actually not using media at all at this point. I just need a way to use colorbox with node gallery. I don't think media is required?
Comment #9
greg boggsHi Dave, I'm a new maintainer of this module. I was not aware that this module worked with node gallery.
The Node Gallery module allows you to create multimedia galleries where both the galleries and the gallery items are nodes. (as opposed to gallery items being file fields, like Media Gallery)
Since you are not using media, you can use the colorbox module on nodes. I'm sure there's integration with the node gallery module.
~Greg
Comment #10
durum commentedIs there any update on this?
Right now fields from files of type video are displayed. But fields from images are not displayed where the file template is not used and only a direct link to image itself is being generated.
I wonder if I am doing a configuration error or is that part of the code not yet fixed? If the latter; can this be done without configuration through the admin interface, but by creating a image file template and manually printing the colorbox links in the template file.
Comment #11
durum commentedA quick debug reveals that under
theme_media_colorbox()the section below causes this behaviour:Commenting this out that part in
mytheme_media_colorbox()forces images also open in selected view mode.But now the image in this tpl file is being resized to fit the initial length/height settings from colorbox configuration page. (By videos they have default bigger size from file formatter settings and they can even be maximized with fitvids.)