Loading

Image Lightbox doesn't work

Get help with problems, or report & discuss bugs in Collabtive

Image Lightbox doesn't work

Postby younes » 09.04.2015, 19:15

Hello,
Since I updated for 2.1.1, the image lightbox in "FIles" section doesn't work anymore...
Actually the lightbox works fine with pictures I uploaded with the older version of collabtive 1.2... but all pictures I uploaded since 2.1 doesnt show up in the lightbox... the loading icon can't stop spining and nothing shows up...
Any idea on how to fix this bug?
Thank you
younes
 
Posts: 4
Joined: 09.04.2015, 19:00

Re: Image Lightbox doesn't work

Postby younes » 14.04.2015, 16:48

Hello everyone...
I still try to fix this bug but couldn't find any solution yet...
I came across this Topic on the Forum viewtopic.php?f=11&t=13180&hilit=image+uploaded
... it looks a bit similar to my problem except, in my case, when I rigthclick on the link to download the pic it works perfectly and I don't get any message saying that my file is corrupted...
It's only the lightbox that doesn't work... :/
I wanted to buy the plugin of collabtive but I first want to find a way to make this lightbox work...
Any idea on how to fix this bug?
younes
 
Posts: 4
Joined: 09.04.2015, 19:00

Re: Image Lightbox doesn't work

Postby Eva » 14.04.2015, 21:43

What happens, when you try this in our online demo?
http://collabtive.o-dyn.de/demo
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Image Lightbox doesn't work

Postby younes » 15.04.2015, 11:33

Hello Eva!
Thank you for your message.
I tried on the Demo and I'm having exactly the same problem... So I tried with different browser and I realised that this bug concerns only Google CHROME :/
Any idea on how to fix this problem?
Thank you Eva
younes
 
Posts: 4
Joined: 09.04.2015, 19:00

Re: Image Lightbox doesn't work

Postby some person » 19.04.2015, 11:30

I have investigated this and was able to reproduce this bug.

Chrome is reporting content length mismatch error.

I have looked at what collabtive is reporting for the content length/file size, and collabtive was reporting a wrong file size.

Thinking about it further, the only thing that I thought that could be happening is the file size, that was being reported by collabtive, must be the size of the encrypted file and not the original unencrypted file.

Looking at the file size of the encrypted file, I have confirmed that this is what is happening.

Collabtive is reporting the file size of the encrypted file, instead of the original unencrypted file, and Chrome is refusing to show the image.

On the other hand, Firefox, possibly other browsers, seems to take this wrong content length/file size without any problems and shows the image.

I haven't looked into a possible fix.
some person
 
Posts: 439
Joined: 16.04.2011, 12:46

Re: Image Lightbox doesn't work

Postby some person » 20.04.2015, 10:54

I have come up with a quick fix for this.

Removing the reporting of content-length header field/file size, from collabtive, will have Chrome show/download the images in Lightbox.

To do this, open the managefile.php, found in the collabtive root, using a text editor, and remove the following line.

Code: Select all
header("Content-length: $fsize");

The the following line can also be removed, as the file size is not used/reported anymore, and there is no reason to run the filesize function.
Code: Select all
 $fsize =  filesize($filePath);
some person
 
Posts: 439
Joined: 16.04.2011, 12:46

Re: Image Lightbox doesn't work

Postby younes » 20.04.2015, 11:03

Perfect! Thank you... This fix does the Job :)
Cheers
younes
 
Posts: 4
Joined: 09.04.2015, 19:00

Re: Image Lightbox doesn't work

Postby Eva » 21.04.2015, 01:46

Thank you for providing the bug fix!
We have changed this in our repository, too, so it will be corrected in the next release. :)
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany


Return to Problems and Bugs

Who is online

Users browsing this forum: Google [Bot]