Content encoding error when using Views Slideshow and Lightbox2 and performance caching is enabled
| Project: | Lightbox2 |
| Version: | 5.x-2.x-dev |
| Component: | Javascript |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Not sure whether I should post this in Lightbox2 or Views Slideshow, because it seems to be a conflict issue. Actually, it might be more appropriate to log the error against Drupal core's caching mechanism.
I have a home page that is using Views Slideshow (http://drupal.org/project/views_slideshow). I am using Lightbox2 on the site, but not explicitly on the home page.
I noticed that I was having this error show up in Firefox:
"Content Encoding Error: The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
And this error showing up on Safari:
"cannot decode raw data (NSURLErrorDomain: -1015)
I get these errors when I set Drupal's performance caching to "Normal" (admin/settings/performance). The error does not occur the first time we hit the page - only subsequent times. I suspect this is because it is being served from cache. I do not get the errors when caching is "Disabled".
I have tried to exclude Lightbox2 from loading on the home page by using the Page Specific Lightbox2 Setings. I entered . I have noticed that the Lightbox2 JavaScript files do not load on the home page per expectation. But when using caching, it doesn't seem to matter, I still get the error.
I have set the "Location of JavaScript" to footer, thinking that might help.
I thought that maybe if I created a separate (identical) page template file, this would solve the issue. I created "node-front.tpl.php", but that didn't seem to solve the problem.
I event get this error when using Lightbox2 Lite.
Any workarounds for this issue?

#1
I can't reproduce this issue. I've installed the views slideshow module and am using the latest dev release of the lightbox2 module. I've "normal" caching enabled with a "5 min" cache lifetime. CSS compression is disabled. I'm using the default views slideshow settings, and have a slideshow view created which shows node titles and imagefields from one of my cck nodes. I even have the imagefields configured to display in a lightbox when clicked on and it's all working correctly.
However, I'm running a lighttpd webserver and from searching on the web, I imagine this is an apache mod_gzip error.
Do you receive the error if you disable the lightbox2 module? Similarly do you see the error if you disable the views slideshow module? Try downloading the "devel" module and using that to clear your Drupal cache, then retest. It might just be a simple issue of a corrupt cache.
Cheers,
Stella
#2
Thanks for looking into this!
No.
No. In fact, the error only happens on the home page, where both are being used. Even when this situation is occurring on the home page, all other pages on the site are accessible without any problem. Lightbox2 is not disabled on any of those pages.
I have been doing that. Note that this issue only happens for users who are NOT logged in. After clearing the cache, I log out. I then visit the home page where the Views Slideshow module is active. Everything looks fine. Then I hit reload. That's when I get the error. Your suspicion of corrupt cache feels right to me because the issue only occurs when cache is enabled and on a 2nd (cached) visit and that it doesn't occur for logged in users (not using cache).
I looked at my PHP Info and I don't see mod_gzip listed - but since this is an Apache config, I wouldn't expect it to show up there. I suppose the next step is to contact my host to see about disabling it? Or is that that wrong path to take?
Additionally, the last post on both of these threads seems to suggest the same:
http://revision3.com/forum/archive/index.php/t-19873.html
http://forums.mactalk.com.au/16/51384-safari-can-t-open-page.html#post53...
#3
I wasn't aware that it only happened for anonymous users, but unfortunately I still can't reproduce it.
Before talking to your hosting company, I would try out the latest dev version of the lightbox2 module, just to see if that helps.
Cheers,
Stella
#4
Excellent!
The latest dev version (2008-Jul-24) works GREAT! I have the site cached and no errors on the home page!
Thank you for your rapid response and interest!
http://npower.org
#5
#6
Automatically closed -- issue fixed for two weeks with no activity.