XF 2.2 Is anyone else missing attachments in posts?

420

Active member
Has anyone else noticed posts with missing attachments?

We've received some reports from members who are confused as to why their attachments are missing in posts. They haven't been removed by staff and the members themselves haven't removed them either.

We're trying to get down to what the cause may be, so we're trying to see if anyone else has experienced such an issue.

Thanks
 

420

Active member
I don't believe so.

1. It says "The requested page could not be found." when trying to directly load the deleted attachment.
2. The attachment browser also doesn't show any results from the member for the date the post was made.
3. I viewed the post in Chrome and Firefox private browsing modes. Never loaded.
Not I. Are these linked attachments maybe check your image / link proxy.
Nope, they aren't linked.
 

Brogan

XenForo moderator
Staff member
If the members are not deleting the attachments themselves, and moderators are not editing posts to delete the attachments (which would show in the log), and administrators are not deleting them via the UI in the ACP (which would show in the log), then I can only assume it's a third party add-on involved, or something server side deleting the files directly from the file system.
 

420

Active member
or something server side deleting the files directly from the file system.
What would delete these files server-side?
Our issue might be the same but slightly different.
1. It says "The requested page could not be found." when trying to directly load the deleted attachment.
2. The attachment browser also doesn't show any results from the member for the date the post was made.
This could be because xenForo cleans up the attachment after 24 hours.

Images are displayed in posts until they're cleaned up. Or that's at least how it's been for the people observing it. I've noticed the attachment break once (when I loaded it, it said "You do not have permission to view this page or perform this action") but then permanently came back and loaded fine, while it was shown as "unassociated".

It closest matches one member's issue and that's @ProCom:
It’s been a nightmare trying to track down the cause of this issue! The dozen of members helping us troubleshoot are experiencing the problem, then try again and the same attachment works, then try again and it is unassociated, etc. etc. etc.

I’ve never seen such a completely inconsistent issue/bug that has zero consistency between users, processes, images, browsers, settings, etc.
We even got about 10 members that were all having the issue to come together online at the same time so we could disable ALL addons to see if that would do the trick... but then they all stopped having the issue, even using the same images, browsers, steps, network connection, etc. etc. etc.

... that is until a little later when they started having issues again!

UGH!
I've compared addon lists with several XF members already with this issue and I can say with confidence this most likely isn't addon related. ProCom said he's also disabled all addons but still notice the issue.

We've only heard reports from our members of this happening after upgrading to xenForo 2.2.3 Patch 1.
 
Last edited:

thaisnack

Member
Is it possible to relink images? I found the images in "public_html/internal_data/attachments" but they are named .data. If I change to .jpg I can see the image. I reccon the link is made in the database? Can anyone explain to me how they are linked togeheter, please.
This post was made in 7th of february 2019. The images are gone. As admin I can se the thumbnails but when I click the images the error message above in post #7 shows.
Link to post: https://thaisnack.se/threads/mc-och-allt-som-hoer-till-oavsett-land.14099/post-335195
 

Brogan

XenForo moderator
Staff member
They would have to be uploaded to the posts again.

Download the .data files from the server, rename the extension as required (.jpg, .png) attach them to the posts.
 

thaisnack

Member
They would have to be uploaded to the posts again.

Download the .data files from the server, rename the extension as required (.jpg, .png) attach them to the posts.
Yes, okay I understand. Quite a comprehensive work. Can I search for the image filenames in the attechements catalog after switching to .jpg instead of .data? Searching for images by looking at them will be to much I think.
From post #8 example. Missing image in link is "A87E9EDB-3C74-4AA4-BA66-1E5978A2DFF2.jpeg" how can I search for that exakt image in the attachements catalog?
 

Radikus

New member
I've seen this with my forum also, but the images just completely disappear.

Only way to see there was an image is to open a posts with edit and see [ATTACH=full]8315[/ATTACH]

But the image can't be seen at all even in the attachment browser. It's like it never existed.
 
I've had this happen a few times and believe it to be caused where a user utilises a cloud service for storage of their images eg Apple users with Apple phones using iCloud. The post has been created, the user has attached an image from their photos but in reality all they have in their photos on their device is a tiny thumbnail. If they press 'post reply' before the image has had chance to fully download to their phone in order to be uploaded to the forum then exactly View attachment 8315 appears in their post.

Don't take this as gospel and run off down a false alley I'm just stating something I have observed and what I believe to be the issue in our case.
 

Radikus

New member
I've had this happen a few times and believe it to be caused where a user utilises a cloud service for storage of their images eg Apple users with Apple phones using iCloud. The post has been created, the user has attached an image from their photos but in reality all they have in their photos on their device is a tiny thumbnail. If they press 'post reply' before the image has had chance to fully download to their phone in order to be uploaded to the forum then exactly View attachment 8315 appears in their post.

Don't take this as gospel and run off down a false alley I'm just stating something I have observed and what I believe to be the issue in our case.

This is not what I'm talking about, because these are pictures that I have seen with my own eyes, and the next day they are gone from the server. They were already there.

And now I'm little worried, since all my attachment folders have only ~900 files. How can it be that it's always ~100 files (10%) that have been removed or something else has happened. How many data files do you have in your folders?
 

Creaky

Well-known member
What patch are you talking about? I've seen missing pictures this week, and have been using v2.2.3 Patch 1 for way longer.
Proabably this one

 
  • Like
Reactions: 420

420

Active member
What patch are you talking about? I've seen missing pictures this week, and have been using v2.2.3 Patch 1 for way longer.
See this post - https://xenforo.com/community/threa...-disappear-after-24-hours.191663/post-1502749

Ok. So it seems the two issues are connected after all and was related to a change between 2.2.2 and 2.2.3.

However, the change was related not to anything to do with attachments but, rather, our JavaScript that provides multi-quote sorting. It seems the issue only shows up when multi-quote is used, and wasn't directly related to attachments hence why it was tricky to track down and didn't obviously show up when we were reviewing changes between 2.2.2 and 2.2.3.

This is fixed in XF 2.2.4 but we acknowledge that this may be causing some fairly significant issues.

In the meantime, feel free to download our current copy of the fixed code which is available to download from here:
(Right click, save as, upload to your XF installation replacing the existing js/xf/nestable-compiled.js file.)
Note: If you are running your forum with $config['development']['fullJs'] = true; enabled then you will instead need to download and replace js/xf/nestable.js.

When you do this, XF will warn you on an ongoing basis that your nestable-compiled.js file has unexpected contents. This can be safely ignored and will go away once you have upgraded to XF 2.2.4.

Let us know if the fix works for you.
Replace the current file with the file Chris provided and then rebuild master data.
 
Top