I do not know if I am the first to have seen that, but i found that the random images does not work when you activate the compression of CSS and JS files.

The problem disappears when you log to the admin account.

Any ideas about this ?

Thanks

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

It's not clear to me what the actual bug is and which steps you took to reproduce the bug. Can you elaborate on that, please?

woodp’s picture

Version: 6.x-1.0-alpha5 » 6.x-1.1

I'm experiencing a similar problem - Random Image block works for admin users, not for anonymous users - but the JS/CCC compression settings have no effect. I was able to get the block working for anonymous users once by "Disable Developer Modules" in the administrative menu. Switching developer modules back on stopped random images for anonymous users, so I thought I duplicated the issue. But then switching "Dev Modules" off another time did not re-enable random images for anonymous users. And since then, I've never been able to make the Random Image Block work for anonymous users.

Even closing down and/or changing browsers will not generate a random image. Anonymous users see the same image over and over again.

When changing the "Enable/Disable Developer Modules" setting, a green window indicates I'm enabling and disabling "imagecache_ui" and "views_ui." But that's surprising as the installed modules are not dev modules:

ImageCache 6.x-2.0-beta10
Views 6.x-2.12

I have a second site that has Views installed, but not ImageCache, and the Random Image Block works fine for anonymous users.

Any thoughts about what's going on?

http://www.classicjets.org/ - Random Image Block does not work for anonymous users
http://www.rcb.org/ - Random Image Block does work for anonymous users

woodp’s picture

Title: Random Images & CSS, JS Optimisation Incomptability » Random Images not working for anonymous visitors
Assigned: quicksand » Unassigned
Category: bug » support
Status: Postponed (maintainer needs more info) » Active

Should have renamed the issue when I posted the previous issue report

woodp’s picture

Title: Random Images not working for anonymous visitors » Solved - Random Images not working for anonymous visitors
Status: Active » Closed (fixed)

Trial and Error finally uncovered a solution - Random images are now appearing for anonymous visitors as well. The settings that seem to work for me on the Site Configuration | Performance page:

Caching Mode: Normal
Page Compression: Enabled
Block Cache: Disabled
Optimize CSS files: Disabled
Optimize JavaScript JS files: Disabled

I don't believe I've solved the root cause of the problem - It makes no sense that the "Random Image" block works for admin visitors but not for anonymous visitors unless Block Cache is turned off. But at least the website is working again.

If anyone has any thoughts, I'd love to hear them!

woodp’s picture

Component: image_gallery » image.module
Category: support » bug
Status: Closed (fixed) » Active

It turns out my Feb 8 "fix" didn't fix anything - I was purging the cache to get the images to change. The "Random Image" block works for authorized visitors but not for anonymous visitors.

Does anyone have a site with that block that I could visit?

joachim’s picture

If you have page caching on, then anon visitors will see the same identical page over and over until the cache is refreshed.

Mick Cagney’s picture

I have the same problem, works for authorized users but I only want it on the landing page opposite the login link; so I need it to work for unauthorized users.

Anybody?

Caching Mode: Disabled
Page Compression: Disabled
Block Cache: Disabled
Optimize CSS files: Disabled
Optimize JavaScript JS files: Disabled

________________________________________________

Drupal core 6.22
Recommended version: 6.24 (2012-Feb-01)

Download
Release notes

Security update: 6.23 (2012-Feb-01)

Download
Release notes

Includes: Block, Comment, Filter, Forum, Garland, Menu, Node, PHP filter, Path, Profile, System, Taxonomy, Update status, Upload, User, imadethis
Modules
Up to dateok
Account Profile 6.x-1.x-dev (2011-Jun-15)
Includes: Account Profile
Up to dateok
Advanced help 6.x-1.2
Includes: Advanced help, Advanced help example
Up to dateok
Alter profile page 6.x-2.6
Includes: Alter profile page
Up to dateok
Calendar 6.x-2.4
Includes: Calendar, Calendar Multiday, Calendar Popup, Calendar iCal
Up to dateok
Colorbox 6.x-1.1
Includes: Colorbox
Up to dateok
Content Construction Kit (CCK) 6.x-2.9
Also available: 6.x-3.0-alpha3 (2011-Mar-17)

Download
Release notes

Includes: Content
Up to dateok
Content Profile 6.x-1.0
Includes: Content Profile, Content Profile Tokens, Content Profile User Registration
Up to dateok
Date 6.x-2.8
Includes: Date, Date API, Date PHP4, Date Popup, Date Repeat API, Date Timezone, Date Tools
Up to dateok
Drag'n'Drop Uploads 6.x-1.0-beta2
Includes: Drag'n'Drop Uploads
Up to dateok
Drupal tweaks 6.x-1.x-dev (2011-Mar-21)
Includes: Database tweaks, Drupal tweaks
Up to dateok
Fancy Login 6.x-1.7
Includes: Fancy Login
Up to dateok
FileField 6.x-3.10
Includes: FileField
Up to dateok
FullCalendar 6.x-2.0-alpha2
Includes: FullCalendar
Up to dateok
Image 6.x-1.1
Includes: Image, Image Attach, Image Gallery, Image Import, ImageMagick Advanced Options
Up to dateok
ImageAPI 6.x-1.10
Includes: ImageAPI, ImageAPI GD2
Up to dateok
ImageCache 6.x-2.0-beta12
Includes: ImageCache, ImageCache UI
Up to dateok
ImageField 6.x-3.10
Includes: ImageField
Up to dateok
IMCE 6.x-2.3
Includes: IMCE
Up to dateok
jQuery UI 6.x-1.x-dev (2011-Jun-17)
Recommended version: 6.x-1.5 (2011-Jun-17)

Download
Release notes

Includes: jQuery UI
Up to dateok
jQuery Update 6.x-2.0-alpha1+7-dev (2012-Jan-19)
Recommended version: 6.x-2.0-alpha1 (2010-Apr-23)

Download
Release notes

Includes: jQuery Update
Up to dateok
me aliases 6.x-2.9
Includes: 'me' Aliases
Up to dateok
Menu per Role 6.x-1.11
Includes: Menu Per Role
Up to dateok
Pay 6.x-1.1
Includes: Node payments, Pay, Pay progress
Up to dateok
PayPal 6.x-1.0-alpha3
Includes: PayPal
Up to dateok
Plugin Manager 6.x-1.11
Includes: Plugin Manager
Up to dateok
Poormanscron 6.x-2.2
Includes: Poormanscron
Up to dateok
Spell Checker 6.x-1.0
Includes: Spell Checker, Use Google API for Spell Checker
Up to dateok
Theme Settings 6.x-2.x-dev (2011-Feb-25)
Includes: Theme Settings
Up to dateok
Themer 6.x-2.0
Includes: Themer
Up to dateok
Token 6.x-1.18
Includes: Token, Token actions, TokenSTARTER
Up to dateok
Ubercart 6.x-2.7
Includes: Cart, Catalog, Conditional Actions, Order, PayPal, Payment, Product, Product attributes, Reports, Stock, Store
Up to dateok
Ubercart Out of stock Notification 6.x-1.7
Includes: Out of stock notificator
Up to dateok
Ubercart Payment Method Adjustments 6.x-1.0
Includes: Payment Method Adjustments
Up to dateok
UC Variable Price 6.x-1.1
Includes: Variable Price
Up to dateok
Views 6.x-3.0
Includes: Views, Views UI, Views exporter
Up to dateok
Wysiwyg 6.x-2.4
Includes: Wysiwyg
Up to dateok
Wysiwyg SpellCheck 6.x-1.3
Includes: Wysiwyg SpellCheck

Mick Cagney’s picture

Title: Solved - Random Images not working for anonymous visitors » Random Images not working for anonymous visitors
joachim’s picture

> Views 6.x-3.0

IIRC Views 3 has built-in caching of some sort. Might that be the cause of the problem?

Mick Cagney’s picture

Might be, although I'm not getting any image at all, if it were caching wouldn't I keep getting the same image?
Anyhoo how would I go about checking if it is Views caching?

(Sorry not much of a programmer and new to Drupal)

joachim’s picture

Can anyone actually try debugging this?

- is the block being rendered or loaded from cache?
- is the cache failing?
- if the block is being rendered, does its query return something
- etc etc.

Mick Cagney’s picture

I don't know how to debug or find out any of that but if someone else can that'd be great...

For the record; by allowing permission for anon users to 'Access Content' the pics appear, also allowing them access to the whole site which, in my case anyway, is unacceptable. (Not sure if that was obvious)

joachim’s picture

Status: Active » Closed (works as designed)

> by allowing permission for anon users to 'Access Content' the pics appear

If users don't have the 'access content' permission then they can't access content. That includes image nodes.

Mick Cagney’s picture

Category: support » bug

So can I allow access to just image nodes while leaving the rest behind the login wall?

I have allowed 'view original images' for anon users. This does nothing. Can I insulate all other nodes somehow?

Mick Cagney’s picture

Category: bug » support
joachim’s picture

Category: bug » support

You need to look at one of the various node access modules.

Mick Cagney’s picture

Status: Closed (works as designed) » Closed (fixed)

@ joachim: That worked for me - thanks for your repeated help.
For others with this problem here's the breakdown.
------------------------------------------------
Installed and Enabled module 'Content Access'
http://drupal.org/project/content_access

Enabled 'Access Content' for Anonymous Users in the regular Drupal Users Permissions.
I then allowed Anonymous Users to view images in
Administer > Content Management > Content Types > Image > Edit
Click the tab 'Access Control'
Enable 'View Any Content' for 'Anonymous User'.

Then go and disable the same option for all other content types.

Thanks all who helped, and the rest of you enjoy!

joachim’s picture

Status: Closed (fixed) » Closed (works as designed)