XF 2.1 Wrong attachments being displayed

knobby

Member
Hi,
I've noticed on some posts in my forum that certain pictures are being displayed which are nothing to do with the post, and are not what the attachment should be. I have found that the pictures actually come from a posts in a "staff only" forum which I made many years ago. An example may explain better:
Screen Shot 2020-08-17 at 09.02.32.jpg

As you can see above the attachment is a spreadsheet, and the original poster inserted it into the post. The motorcycle picture (which this poster would not have any access to) was a test attachment in a thread in a restricted access node.
There are other examples of a similar nature.
Any idea what's going on and what I can do to fix it?
Thanks

Edit: you can see the original thread here: https://www.accordionists.info/threads/learning-to-tune.6469/#post-69757
The same image of the motorbike also appears in post 12 of that thread.
 
Last edited:
I've looked at this a little more - if I edit this post then the picture in the post is supposed to be attachment 8 (see below):
Screen Shot 2020-08-17 at 15.39.13.png

If I inspect the element in Firefox it shows the following:
Screen Shot 2020-08-17 at 15.42.14.png

Anyone any idea what's going on and how I can fix it?
Thanks

EDIT: The actual picture on the original post in the restricted node is called offroad.jpg
 
What is the actual attachment ID of the spreadsheet?

The poster could have just entered the wrong attachment ID when composing the post.
 
Here is another instance further down the same thread:

Screen Shot 2020-08-17 at 16.06.14.webp

This should be showing the attachment linear_bps.2.jpg not the picture shown above. If I go into edit mode I get the following:
Screen Shot 2020-08-17 at 16.07.04.webp
It's calling attachment 2
 
If attachment IDs are being reused then you have some level of corruption in the database.

What ID value is provided for a new attachment uploaded?
 
Screen Shot 2020-08-17 at 16.25.02.webp
I've just added this attachment to a post a few minutes ago. There don't seem to be ID values, only the name of the attached file. Or do I need to look somewhere else for this information?
 
Back
Top Bottom