I have tried the module with a block in standard Drupal caching.
Works fine in automatic and manual refresh mode. But only on page load mode - fails.
The block contains a php generated image, so I am looking for a way to refresh it on each page load not disabling caching.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tripper54’s picture

Status: Active » Postponed (maintainer needs more info)

HI flamez-b,

Some questions:

1. Define 'fails'. Does the block not refresh, refresh but load the same content, or do you get an error? Or something else?

2. Do you have page caching enabled? If so, what happens when you disable page caching? Does the block refresh behaviour change? If so, how?

Thanks!

flamez-b’s picture

Thank you for a quick reply.
On page reload the block loads the same content, no refreshing, no errors occur.
Disabling caching the behavior gets as aspected - images change each time on reload.
I have also tried the demo block from the module set, but with the same result.

tripper54’s picture

Have you tried using the "bypass drupal page cache" option in the block refresh settings for the block?

Also, have you tried setting the "external cache max age" to 0 ?

flamez-b’s picture

Enable block to be refreshed on page load - on
Send page path arguments to block - on (doesn't effect)
Bypass Drupal page cache - on (automatic change doesnt work if "off", so it is allways "on")
External cache max age - 0 (doesn't effect, tried 0,1,10)
others - off

flamez-b’s picture

FileSize
45.35 KB

I am sorry, I have not noticed initially - there is a mistake on reload, screen attached...

flamez-b’s picture

tripper54’s picture

hmm, that's strange. You say auto and manual refreshes work OK?

Can you show me the request in the console for these refreshes?

flamez-b’s picture

FileSize
45.19 KB

Yes, other types of refreshes work normally... screen attached

tripper54’s picture

That screen shot shows another 404. What happens when you press the manual refresh link? Does another GET request appear in your console (hopefully one that returns 200)?

flamez-b’s picture

Just a moment...

flamez-b’s picture

FileSize
73.52 KB

Attaching screen with autochange...

flamez-b’s picture

FileSize
59.96 KB

...and the screen with manual reload (3 reloads made).

flamez-b’s picture

Have just bypassed all my alterations in .htaccess and dissaled all non-core modules - the bug remains.

flamez-b’s picture

...plus cleared template.php and unplugged all other js-files - the bug remains.

tripper54’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
721 bytes

Ah. There's a bug in the block generation callback where it first checks if the block is enabled before calling the block.

Try the attached patch.

flamez-b’s picture

Now Works!!!
Thank you so much!
So I may keep now on the futher testing.

flamez-b’s picture

Status: Needs review » Closed (fixed)
tripper54’s picture

Status: Closed (fixed) » Reviewed & tested by the community

I'll leave this issue as RTBC until I commit the patch. Thanks for your help in finding this.

flamez-b’s picture

Oh, I am sorry for closing the issue... yet don't now all the drupal.org rules...
About the module, there's a little feature request - I'll write about in another thread.

Thank you, tripper54.

flamez-b’s picture

I have noticed an interesting moment handling page reloads:
As I said I use the module to shuffle images on each reload, so when reloading a page it comes some fast blinking of an image that was initially cached with the whole page, i.e. assume that we have two layers – the upper one is a layer that changes on reload, and the lower is the one laying constantly on the same place like a pad and getting visible each time we change the upper layer. These several millisecond during refreshing produces such blinking.
I guess the only thing that could be done to mimic this effect is to disable expire time in .htaccess with the type of images shuffling in this block, but I am afraid this could be a tricky one so that not to affect all other images. Or maybe there are some ways?

flamez-b’s picture

Well, supposed to be this effect is not because of the cached pages - I dissabled all caching but the blinks go on. Really strange, I have to think that this goes from somewhere inside the module.

tripper54’s picture

Hi flamez-b,

Could you move your observations to a new issue? This issue has addressed your original bug report. It's best to keep these things as granular as possible so we can keep track of what's been fixed and what hasn't.

thanks

tripper54’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-2.x-dev

  • Commit e3571fa on 7.x-2.x by tripper54:
    Issue #2280127 by tripper54, flamez-b: fixed init refresh failure
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.