XF 2.1 Images being switched with different images on refresh

mitchelled

Member
We have an issue reported by multiple of our members where images are switching when people leave and return to a page, or just refresh the page. Here is the thread discussing it:


And here is an example....click this and refresh (does this most on Chrome, but apparently IE too):


We think this is a browser issue, but thought we should ask here too.

Julian
 
Not something I'm personally able to reproduce there but I'm certain this wouldn't be a bug in the software. It feels like it could be an issue with caching or an add-on or some other customisation.
 
@Chris D, unfortunately it is reproducible. We have members complaining about this using Chrome and Internet Explorer.

I am not aware of any add-on that we have installed that would randomly alter which image from the page is displayed.

If you repeatedly load the URL https://jetboaters.net/threads/show-us-what-you-see.4515/page-340#lg=attachment108967&slide=0 which should display green metal boat on a trailer but occassionally it will show a different image.

For example this was my 21st load today in an attempt to reproduce the issue. The image URL displayed in the html is correct but the image displayed is not.
Screen Shot 2019-12-14 at 12.14.41 PM.webp

The image that was displayed was https://jetboaters.net/media/smartselect_20180814-121419_chrome-jpg.6009 while https://jetboaters.net/attachments/0510a003-c0e9-40ea-ad9e-6b233709d7cc-jpeg.108967 should have been displayed and was specified in the HTML.

These are the associated webserver logs. The images were 304 not changed responses.

Code:
162.212.30.20 - - [14/Dec/2019:13:13:03 -0500] "GET /threads/show-us-what-you-see.4515/page-340 HTTP/1.1" 200 45666 "https://jetboaters.net/threads/have-you-seem-this-glitch-on-the-forum.25000/page-4" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:04 -0500] "GET /attachments/a32ae9d6-2f28-44f6-b49e-886c86b4eabe-jpeg.108896/ HTTP/1.1" 304 64968 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:04 -0500] "GET /media/smartselect_20180814-121419_chrome-jpg.6009/full HTTP/1.1" 304 377182 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/1576188769760-png.109048/ HTTP/1.1" 304 69641 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/bri-jpg.109062/ HTTP/1.1" 304 69641 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/ca5eb447-9994-41c1-96eb-4ec818bcc225-jpeg.109069/ HTTP/1.1" 304 69641 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/1576188910267-png.109049/ HTTP/1.1" 304 601511 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/7112ddad-6cec-496f-80b8-6b32863f5df2-png.109006/ HTTP/1.1" 304 1637869 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/0510a003-c0e9-40ea-ad9e-6b233709d7cc-jpeg.108967/ HTTP/1.1" 304 2026428 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:06 -0500] "GET /attachments/db07f1b2-47e1-4839-ba7d-65206220398d-png.109070/ HTTP/1.1" 304 1458913 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
162.212.30.20 - - [14/Dec/2019:13:13:05 -0500] "GET /attachments/a79bc882-5c80-4925-b718-df05db421eaf-png.109072/ HTTP/1.1" 304 1245418 "https://jetboaters.net/threads/show-us-what-you-see.4515/page-340" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"

We are running Xenforo v2.1.5.
 
Here is a second example. The URL is correct but a different image that appears on the same page is displayed.

Using Chrome 78.0.3904.108 I saw the wrong image displayed on five of fifty command + R page reloads.

Using the same Chrome with command + shift + page reloads that clear the cache the image was displayed correctly fifty out of fifty times.

Using Safari the image was always displayed correctly over 50 command + R page reloads.

Using Firefox the image was displayed correctly 49 times and one error occurred where no image was displayed.


Screen Shot 2019-12-14 at 12.48.07 PM.webp
 
And what is strange is this just started happening in the last 2-3 weeks. We didn't change the Xenforo software or modify any of the configuration. The last config change we made was in late october when we increased the posts per page from 25-30.
 
Here is an example of the link Bruce posted above:

If you repeatedly load the URL https://jetboaters.net/threads/show-us-what-you-see.4515/page-340#lg=attachment108967&slide=0 which should display green metal boat on a trailer but occassionally it will show a different image.​

I reloaded this image 5 times, and the first 4 times it showed the proper photo (of a green metal boat), then on the 6th refresh it showed this image (you can see from the URL, it is the same as the link above). I did this on Chrome - where most of our members are complaining about it.

1576517655192.webp
 
caching issue most likely related to varnish. Try disabling varnish if you have it ON on the server and see whether that resolves the issue or not. If not check other caching systems as well.
 
caching issue most likely related to varnish. Try disabling varnish if you have it ON on the server and see whether that resolves the issue or not. If not check other caching systems as well.

Unless Varnish is included inside Xenforo without adding it to Apache we are not running Varnish or any other caching system. Just Apache and Xenforo.
 
I have registered an account and I can see the issue when logged in:

1576523819177.webp

Clearly the URL in the element inspector is correct, but the image displayed in the browser is wrong.

There are some common causes for this, some of which have been mentioned already, but I'm not convinced they are the issue here. Generally if it was some sort of caching service on the server, there would be response headers which indicate what returned the image, that a cache was hit and so on.

I'm not seeing any signs of that.

How are your attachments stored? Are they stored as per default XF local storage or are they hosted remotely? Some add-ons provide this functionality, or there are built in methods of storing attachments remotely such as with AWS S3 or similar. Do you do anything like that or are the attachments stored locally on the server?

Which add-ons do you have installed and enabled currently?
 
What is also strange is that (for me at least), it is always the same 2 images that it displays wrong....

Here are the addons installed (Bruce will have to answer on the storage question):

1576524522281.webp
 
I appreciate that this will disable some functionality on your forum for a period of time, but are you in a position to disable all of these add-ons?

The easiest way to do this is to click the "Disable add-ons" button at the top of the add-on list page. This allows you to easily re-enable them again when we've done testing (and it remembers the ones that are already disabled so they don't get re-enabled).
 
I appreciate that this will disable some functionality on your forum for a period of time, but are you in a position to disable all of these add-ons?

The easiest way to do this is to click the "Disable add-ons" button at the top of the add-on list page. This allows you to easily re-enable them again when we've done testing (and it remembers the ones that are already disabled so they don't get re-enabled).

I have started this process. Currently the forum is Rebuilding Permissions.
 
As an update, we went through a long process of turning on add-ons one at a time and eventually located the offending add-on. After reporting the issue the developer provided a patch within hours. The issue has not been reported in recent testing.
 
Back
Top Bottom