matcorrao VIP
Total posts: 83
03 Март 2016 01:09

Hey guys!

How are you?

I believe there's a problem going on with my gallery setup on a site, where full view images don't open on lightbox/gallerybox/rockbox.

You can check this on this link: http://www.orugga.com/our-work/item/107-francesgo

On the left column, at the bottom, you'll see the "Screen Shots" field with some thumbnails. When you click on it, the full images never open. This same problem is happening on localhost, where I have other Cobalt sites running and they just work fine.

I've already tried:

  • Reuploading the images
  • Last version of Gallery field
  • Var dumping the file controller, specifically the show function to check if I found sth. Unfortunately nothing, but it seems as if images were not being properly generated.

Please advice.

Thanks in advance, Matias

Последние изменения: 08 Март 2016


Sergey
Total posts: 13,748
03 Март 2016 01:20

I need access to your file system. Either install something like xtplorer or give me FTP.


COBALT
Total posts: 408
04 Март 2016 09:57

У меня была подобная проблема. Проблема оказалась в плагине System - Widgetkit от Yootheme, просто отключил его (с обновлением шаблона проблема исчезла). Тут явно что то подобное.

По прямой ссылке открывается не картинка, а набор символов.


matcorrao VIP
Total posts: 83
04 Март 2016 14:05

Hey Cobalt,

I had to translate your answer to see that you were suggesting that this problem could be related to the Widgetkit or YooTheme plugin. Unfortunately no, none of those plugins are installed on this site. Actually, the site is pretty Joomla-standard besides Cobalt. Anyway, thanks for the link.

Thanks, Matias


pepperstreet VIP
Total posts: 3,837
05 Март 2016 17:47

Hello Matias,
do other Gallery/Lightbox options work? I mean, is the issue related to RokBox option only?


BTW, I have tested your example URL and have opened the lightbox content link directly:

Firefox shows garbled text/code!

Bildschirmfoto 2016-03-05 um 18.50.35

The console says:

"Error: The character encoding of the HTML document was not declared. ..."


matcorrao VIP
Total posts: 83
07 Март 2016 12:57

Hi PepperStreet!

Nope, none of the options seem to work. Yes, that's true, I actually had to check the source code to see what was going on (first thought the site was hacked), but everything seems to be just fine in terms of code. I even compared the code from the gallery (and image generator libraries) to other Cobalt sites and it everything looked OK.

Sergey, I've provided access for the FTP, were you able to check this?

Thanks again guys! Best, Matias


Sergey
Total posts: 13,748
08 Март 2016 04:49

I cannot understand why but it looks like your server override headers. I have code

JResponse::clearHeaders();
header("Content-Type: image/" . strtolower($files->ext));
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 200000) . ' GMT');
header("Pragma: public"); // required
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

echo readfile($thumb);
exit();

I set header that this is content type image.

 http://www.orugga.com/index.php?option=com_cobalt& ;task=files.show&id=116&user_id=215&fldr=gallery7-104&file_key=d3a92179e8a19659255f5ba4e9ec7246&tmpl=component

But it changes it to text/html. Looks like it is some server settings.


matcorrao VIP
Total posts: 83
08 Март 2016 16:18

Finally found it: The Asynchronous Google Analytics plugin (AsynGoogleAnalytics) was causing issues, I believe, by injecting code on the response. After disabling the plugin, the images displayed just fine.

Thanks to everybody for your help!

Работает на Cobalt