Banners seem to break when "Cache blocks" is enabled on the performance page.

Just to make sure its not an website setup issue... can anyone else reproduce this issue?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

james.elliott’s picture

Status: Active » Postponed (maintainer needs more info)

Seems no one was able to reproduce this. I was not either.

tamsoftware’s picture

I have an issue which could be or not be related. Haven't been able to tie it to anything yet, but sometimes the banners don't show. Slide stays stuck on the first slide, block has twice its normal height and nothing moves. Works on some pages of the site and not on others. Very weird. Not enough info yet but my two cents.

mariano.barcia’s picture

I'm experiencing this issue. I had to disable "Cache blocks" otherwise the block breaks completely.

I'm using D7.2 and the latest dev version of the module (datestamp = "1301544000" in .info file)

BTW, it gets fixed upon cache clear

mstef’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

I can confirm that this is happening, with the latest code (3/31/11). Once the block cache is turned on, and you're NOT logged in, the rotation controls are not available and no rotations happen. After looking at the source, it seems like the JS settings for rotating banner aren't being injected:

"rotatingBanners":{"rotating-banner-1":{"fluid":"1","width":"","height":"", ..... etc

I see the drupal_add_js() call inside theme_rotating_banner(), and it's not being hit when the cache is turned on.

mstef’s picture

Best option to just set the block to not be cached in hook_block_info()? Is there a better way to inject the JS and remain cached?

mstef’s picture

Simple 1-line patch following the solution in #5. There could definitely be a better way to do this, but this works (for now).

mstef’s picture

Status: Active » Needs review
tamsoftware’s picture

#6 Patch works great here ! Thanks mikestefff !

Franck Horlaville
TAM Software

finngruwier’s picture

In my case auto-rotation did not work for anonymous users. Deactivating block cache helped.