themetman's picture

I have a problem on my site with images which I have uploaded to the site from my home not being refreshed on the page or block.

I have tried disabling the cache and I have even got the Block refresh module refreshing every 5 mins, but some items are refreshed, and others are not.

I even have a page with all images OK, but another not. Even if I manually refresh the page it does not update the images, just brings them up from a cache I suppose. If you want to have a look, compare the dates on the images on this page with this page

I have even done a

drush cc all

and still no good.

Any clues?

Most helpful answers

@themetman - I don't have an answer for you, but I'll brainstorm a few thoughts/questions that may or may not be helpful. Maybe, if you provide additional information - we can offer more suggestions.

1) How are you placing the images on the page? It looks like you've added them to the body field. Are you using the image widget in ckeditor?

2) Do you have any image fields on your nodes - is it different for images in the body field from images in an image field?

3) Are you using services like Cloudflare or other server based caching that might be overriding the Backdrop cache settings?

4) If you edit a node text and image, does the text update but not the image? Is this problem only with images or is other content effected?

5) Have you ruled out browser caching as the problem. If you open the site in a new browser, in an incognito window, or on a new computer - does it server the new or the cached image? Have you tried clearing your browser cache?

6) While views and blocks can have their own caching issues, it looks like your images are in the body field of a node page, so they should not be effected by either of those options. Clearing the Backdrop cache is good, but you've done that (hopefully more than once). 

If you figure this out, let us know what you find. Otherwise, proving more information might be helpful.

 

Comments

@themetman - I don't have an answer for you, but I'll brainstorm a few thoughts/questions that may or may not be helpful. Maybe, if you provide additional information - we can offer more suggestions.

1) How are you placing the images on the page? It looks like you've added them to the body field. Are you using the image widget in ckeditor?

2) Do you have any image fields on your nodes - is it different for images in the body field from images in an image field?

3) Are you using services like Cloudflare or other server based caching that might be overriding the Backdrop cache settings?

4) If you edit a node text and image, does the text update but not the image? Is this problem only with images or is other content effected?

5) Have you ruled out browser caching as the problem. If you open the site in a new browser, in an incognito window, or on a new computer - does it server the new or the cached image? Have you tried clearing your browser cache?

6) While views and blocks can have their own caching issues, it looks like your images are in the body field of a node page, so they should not be effected by either of those options. Clearing the Backdrop cache is good, but you've done that (hopefully more than once). 

If you figure this out, let us know what you find. Otherwise, proving more information might be helpful.

 

themetman's picture

Thank you @stpaultim for the brainstorm. I have checked by sshing into my site and the images have all been updated correctly.

To answer the questions in order:-

  1. Yes I am loading into the Body of a Book Page. I am using IMCE to select a file already on the web server from the image widget in ckeditor.
  2. These are not image fields.
  3. I am not using Cloudflare or other caching service as far as I know. Nor am I using HTTPS over DNS in the browser.
  4. Content seems to be fine when edited.
  5. I am using Firefox in Gentoo Linux, but I have tested in another Linux and in Windows 10 Edge (Yuck!) all the same. I have cleared the Browser Cache and opened in a Private Window and still stuck with the same images.

I have added a new Book Page with the same images, and will wait and see if it updates OK. I will post back in a day.

 

 

themetman's picture

Well, @stpaultim  I added the new Book page with the images, and also deleted the images on the Block and reinstalled them, and the images now refresh when the page refreshes.

No idea why it was misbehaving but that has fixed it.

Thanks once again for your help.

amilenkov's picture

I don't know if this is connected with problem, but I noticed a difference between image folders the two pages:

In one that images are not updated, the images are located in the files/resize/met folder. On the other page they are in the files/met folder.

This leads me to the idea that on a page where there are no problems, the images are not resized when uploading.

So this (the “resize” folder) leads me to think that it may be related to the IMCE Role-profile assignments and settings for resizing uploaded photos and the specific profile settings in admin/config/media/imce/profile/edit/1 (or other profile number).

It may have nothing to do with it, but I give an idea that came to my mind.

themetman's picture

Sorry to be slow to get back, @amilenkov, you could be right with the location of the file which has been resized. I will sort this out tomorrow, and let you know.

themetman's picture

OK here is something to think about, @amilenkov. You are correct, here is the source of that image if you look at the page and open the source in Web developer (I am using Firefox in Linux):

<img alt="Barometric Pressure and Rain Last 24 Hrs" height="178" src="/files/resize/met/_R-PressRain24CS-347x178.png" width="347" />

and if you edit the page and look at the source here is the the source for the first image which is not displaying correctly

<img alt="Barometric Pressure and Rain Last 24 Hrs" height="178" src="/files/met/_R-PressRain24CS.png" width="347" />

very strange!!!! How can I fix that one?