Closed (outdated)
Project:
Picture
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Sep 2014 at 17:35 UTC
Updated:
19 Sep 2023 at 23:51 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
maxplus commentedHi,
I have the same issue, my colorbox window opens but becomes very small and does not contain any images...
Did you find a solution?
Comment #2
robertom commentedHi, sorry for my bad english...
I have this problem too, but I don't use flexslider.
This problem (empty colorbox) appear when I select colorbox of type "inline"
Inside the function load() of original jquery library "jquery.colorbox.js", when jquery try to get the "id" object passed by picture, it get only the "wrapper id" without the children... so colorbox doesn't show any image.
jquery.colorbox.js get wrapper and children (picture element) if I force selector to a class.
I don't know why this happens, but I need this functionality and (for now) I have applied these patches @ picture and colorbox (library)
Comment #3
robertom commentedclosed #2370261: Colorbox support broken as duplicate of this bug
Comment #4
robertom commentedComment #5
legolasboAttached patch fixes this issue.
Comment #6
DaPooch commentedHow is this activated to test? Unclear how to get inline images to do this.
Comment #7
legolasbo@alanpuccinelli The general lazyloading functionality of the colorbox integration was broken. To test this you can
After applying the patch, the colorbox will show images.
Comment #8
DaPooch commentedI'm aware of how to do it with an image field. What I'm looking to do is create a colorbox automatically for all images used in the body of a node. Ideally the same way the image resize filter does where the largest breakpoint image is lazy loaded as a link automatically for all images that get processed by the picture input filter.
Comment #9
legolasboI don't think your use case is relevant to this issue. Perhaps you should open a new support issue, but to be honest I don't think picture module has the feature you are describing.
Comment #10
4kant commentedThe patch in #5 seems to work in Chrome but not very well in Firefox (37.0.1)
Comment #11
legolasboCan you provide more information about what is actually going wrong?
Comment #12
4kant commentedIn FF Colorbox doesn´t show images on the first click on the image. I have to close the empty colorbox first and reopen it again by clicking on the same image again - that time it´s OK.
If I have multiple images in the same field I have to repeat this process for every image.
In Chrome and Safari (I´m on Windows 7) everything works fine.
Comment #13
legolasboI've tested the patch in firefox 37.0.2 on OSX Yosemite and the images show up just fine without any errors in the console. Do you see any errors in the console?
Comment #14
4kant commentedNo - I don´t see any errors in the console.
Comment #15
legolasboWhich version of Firefox are you using?
Comment #16
4kant commented37.0.2 on Windows 7
Comment #17
legolasboI think I've reproduced your issue. On VM with a clean windows 7 installation with a clean install of firefox 37.0.2 I notice a pretty long delay between the opening of the colorbox and the actual image being loaded. However I don't have to close and reopen the colorbox, it just takes quite long to load the image.
This delay is also (but far shorter) noticable in firefox on my macbook pro. I'll look into it when i have more time to spare.
Comment #18
4kant commented@legolasbo
Today I started a fresh install of picture 2.x dev (of 2015-03-25) with patch #5 again.
This time everything works fine in Chrome AND FF.
But now in IE 11, every time I click on any picture to open the colorbox the browser crashes.
I will try IE 11 on another Computer and will come back with feedback.
Thanks
Comment #19
4kant commentedI tested on 2 different PC´s. One on Windows 7, the other one Windows 8.1. On both PC´s the same behaviour:
In IE when I click on any any image for the first time (even after refreshing the browser) the colobox shows a very small window. The image has been loaded but the size of the colorbox stays about 20 x 20 Pixel small.
When I close the colorbox and click the same image again (or an image I had clicked on before - without having refreshed) the colorbox opens as expected.
Comment #20
attiks commentedAs this patch working, since we no longer use colorbox, I don't have an easy way to test it, but I'm willing to commit it, if it solves the problem.
Comment #21
4kant commented@attiks: does this mean that you "don´t care" about the problems concerning IE?
Comment #22
attiks commentedWe no longer use colorbox for sites we build, and I don't have a machine the easily test the IE versions, if you upload a patch that fixes this I'll commit it
Comment #23
legolasboAttached patch is a new approach to this issue.
This fixes the colorbox staying empty.
I also changed the resizing of the colorbox, because the current implementation produces different results when first loading the image and viewing it a second time. It also allowed for images larger than the screen, which required the user to scroll to view the entire picture.
I've tested the patch in safari, firefox and chrome on OSX and it works like a charm. Please test/review the patch for other browsers aswel, so we can have this fix committed.
Comment #24
legolasboI encountered some problems with the min/max height calculation which caused the controls to occasionally be positioned off screen because the colorbox would be too large. These issues are now fixed.
Comment #25
legolasboAttached patch fixes the ugly hack used to wait for the image to load completely.
Comment #26
legolasboAnd removed debug logging statement.
Comment #28
legolasboCorrect patch now.
Comment #29
legolasboComment #30
legolasboTested patch #28 against 2.12, it still applies cleanly and works like a charm. Could use an extra pair of eyes.
Comment #31
karolus commentedNot sure if comment #6 is still being addressed here, but I tried the latest patch, and it isn't fixing the issues I'm experiencing.
Like Alan Puccinelli, I'm wanting to use this to apply Colorbox popups to all inline body images, which I'm serving responsively using Picture.
To be sure I hadn't missed anything, I downloaded the latest Colorbox library, and even the latest dev versions of the Colorbox, and Picture modules. Also toggled through all available versions of jQuery via jQuery Update.
Still, what happens is that if I apply the class colorbox-inline, or colorbox, all that happens when the image is clicked upon, the colorbox popup will display, but only showing the loading image.
Comment #32
seanbPatch in #28 works for me! Thnx!
Comment #33
attiks commented#31 @karolus can you confirm it is working?
Comment #34
karolus commentedJust applied the patch, still no change. Just loading image still popping up, only.
To be sure Colorbox itself was working, I created a new node, and bypassed Picture completely by hand-coding, and using the class "colorbox-insert-image" on one of the images I'm using with Colorbox Picture. This worked as advertised.
Also, did toggle the JS placement from footer to header in config, and all this did is break functionality altogether.
To show what the code looks like in this breakpoint image, below is the output. The only classes applied for content are sidebarsquare (this selects the proper picture grouping) and colorbox. The rest are added by the module.
<img id="" class="sidebarsquare colorbox init-colorbox-processed cboxElement lazyloaded" title="Carriage Pointe Welcome Sign" alt="" srcset="http://carriagepointe.dd:8083/sites/default/files/styles/focal_point_preview/public/1747-CarriagePointe_HomepageSign.jpg?itok=zn4LTe9u 250w" data-picture-align="right" data-picture-mapping="sidebar_square_mapping">Comment #35
seanbDid you try it on a clean install? Could be there is another module involved?
Comment #36
karolus commentedSean, thanks for the reply.
I'm getting the same issue on another Drupal install, and attached are images.


The first is the created node, with a body field, and below that an image field. The first image is an inline image, placed using a Picture style, with the classes colorbox and colorbox-inline applied. The second is an image field, with Colorbox settings in the field display format. From what I see, like some previous posters, there's an issue with the interaction of Picture and Colorbox for inline images. Hand-coded Colorbox images as inline work, but not with the Picture module.
Comment #37
karolus commentedFor some reason, the third image for #36 isn't displaying, so here it is:
Comment #38
karolus commentedComment #39
lesleyfernandes commentedI am closing all very old tickets that have not received comments for a long time. If someone still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.