Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: SethStudent on November 03, 2019, 06:26:17 PM

Title: Bad links for SOME attachments
Post by: SethStudent on November 03, 2019, 06:26:17 PM
Just found out from a new member that some of my forum's attachments are "missing." He pointed out two image attachments in a post from last year. They had been viewed several times, and suddenly would not open. The URLs looked ok. I downloaded the Attachments folder and the images were in there, I was able to open them in Photoshop. I renamed them and replaced the broken ones and they are fine now.

The member just now said there are a LOT of attachments missing, but didn't give me a list. The attachments look ok in the Browse Attachments list, so I can't tell which links are bad.

I ran repair_settings and everything was set to the recommendations.

Has anyone heard of this before? Short of me looking at every one of the 12,000+ posts and replacing some of the images, is there a maintenance thing I can run to have the links repaired?

I have not added any new mods for years, everything seems to be up to date. https://speakingofseth.com
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 08, 2019, 06:02:32 PM
Sorry to bring this up again, but it's been a while with no response. I came across another post today on my forum where while the attachments had been viewed in the past, suddenly the links are broken: 404 - Attachment Not Found

Image browser URLs from clicking the links:

https://speakingofseth.com/index.php?action=dlattach;topic=1375.0;attach=2046

https://speakingofseth.com/index.php?action=dlattach;topic=1375.0;attach=2048

The images were in the Attachments folder. I was able to open them in Photoshop so they are not corrupted. I'm attaching a composite of screen captures showing the attachment files in various places (folder, database, Browser).

Any idea how I can fix this? Not all attachments on my forum have broken links, just an unknown percentage at this point. There are 2000+ attachments and 12,000 posts and I can't look at every single one of them.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 08, 2019, 10:04:14 PM
There was a change in 2.0 database around 2.0.6 involving mime_type in smf_attachments table.  If mime_type is empty, attachment will not load.  Attachments posted after the change will load correctly.  Look in your database, see if bad attachments have empty mime_type.  If that's the problem, you can run database query to fix it.
Title: Bad links for SOME attachments - a challenge
Post by: SethStudent on November 09, 2019, 11:38:51 AM
Thanks for the idea. I did take a look at the db and can't see anything different about the attachments that are broken compared to the working ones (mime_type is there), but I'm no db whiz. I did a screen capture of several rows, maybe someone else with more experience can spot a discrepancy. Attachments up through 2054 have bad links (images, pdfs, html, txt, doc or avatars). After 2054, they work.

The date of 2054 is 6/9/18. The next attachments were added on 07/16/18. There were four of them added at approximately the same time/same post: 2059, 2061, 2063 are ok, 2057 is not. After that the rest of the attachments appear to be fine.

I looked at dates in the Package directory thinking maybe I did a patch or something around 07/06/18 that would affect the db, but no. 2.0.12 and .13 were installed Feb 2017. 2.0.14 and .15 were installed 08/20/18.

Any suggestions would be greatly appreciated. Needless to say, this is upsetting.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 23, 2019, 03:30:36 PM
I did a test update to 2.1 on a copy of my forum, and that fixed the attachment links for images and docs. The personal avatars are still gone, but I'm not as concerned about that.

I did also do a second test on another copy of my site, turning off mods one by one and checking the attachments to see if it could have just been a mod conflict, but that didn't fix the problem. It was the upgrade that fixed it. It's so tempting to just update my production site at this point.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 23, 2019, 11:03:59 PM
There's an 'Attachment Integrity Check' in Admin -> Attachments and Avatars -> File Maintenance, but I've always been hesitant to run it.  You can try it, but back up your database and /attachments directory before doing so.

Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 24, 2019, 11:10:54 AM
Thanks for telling me about the attachments File Maintenance, it was worth a shot. I'm attaching a capture of the Attachment Stats showing 985 attachments, while the Maintenance shows 1540 attachments "no longer exist on disk." They are on the disk, it's just not seeing them for some reason.

When I ran Maintenance it removed a lot of attachment links from the posts, while a few older attachments reappeared. So I restored my forum back to the way it was before I ran Maintenance. I guess I'll just have to live with it until I upgrade to 2.1. I didn't see RC2 on the Milestones list, RC3 is probably on its way.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 24, 2019, 04:31:53 PM
The different attachment counts is something I've seen before, and the primary reason I don't trust the maintenance task.  In your db screenshot some of the mime types are incorrect.  Any correlation with missing attachments?
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 24, 2019, 05:58:26 PM
Do you mean like where it will say the image thumb is a jpg, but mime type shows image/png? Or are you seeing something else? Attachment Settings has "Save thumbnails as PNG" checked. I don't think I changed that, it must be a default. But I looked at a recent image attachment that works, and in the db it shows the the thumb the same way as above.

I went to an old topic where there were 3 posts with bad attachment links. Attached is a comparison of how the links appear in the posts and how they appear in the database.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 24, 2019, 06:34:05 PM
I'm not seeing anything wrong with any of the db fields.  Screenshot does not show last column 'approved', but they should all be '1' as in first ss.  Would be interesting to see screenshot of same attachments in 2.1.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 24, 2019, 06:36:49 PM
What exactly is the error message? 

Does your browser console show something, e.g., like a 404?

Are the permissions consistent across all the files (in the file system)?

Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 11:08:06 AM
Thank you both!

I do get a 404 when clicking on the "bad" links. The thumbnail does not show in the attachment post and there's a link to the attachment, which results in a 404. It's not consistent—I went to one post from 02/14/17 and while there were no thumbnails showing, the first three of the consecutively numbered links resulted in the 404, the next three links downloaded the image to my computer, the last one brought up a 404.

I can put together a graphic of how those links appear in the current db, compared to how they appear in the one that's been updated to 2.1, but they look the same to me. I'm attaching a simpler example of only one attachment & thumbnail in how they appear in the production site db, the 2.1 update test db, and a db from an old test site that was originally a clone of my current production site. The only place the attachment is messed up is in my production site.

I did also look at the permissions for the attachments and they are all set to 0644.

I don't know anything about databases, is there some sort of master index it uses in order to know where to locate things such as attachments? Could it have "forgotten" where some of the attachments are? By updating to 2.1 on the test site, would the db update process have refreshed such an index?
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 25, 2019, 11:33:16 AM
smf_attachments tables are pretty much identical in 2.0 and 2.1, no idea why upgrade fixes the links.  Can you copy the image links for a good and bad attachment?  Mouseover the thumb and view image info.  If there's no thumb, use inspect element.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 25, 2019, 11:38:04 AM
Unable to register on your forum, first verification question won't work.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 11:51:55 AM
Image links attached. Good idea, even I see a difference! The top one is broken, the second one is from the upgrade test and works.

Sorry you couldn't join the forum, I've had new members join very recently. I took out the first question for now (btw Jane and her husband had different last names). Hopefully you can get in this time.

If you want to check out some bad links, go to https://speakingofseth.com/index.php?topic=530.msg8610#msg8610 but you have to be logged in to see the post.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 25, 2019, 11:55:41 AM
Ok, I'm registered as Krash.  Gotta go, will take a look tonight (NY time).

Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 25, 2019, 12:34:59 PM
The ";image" is added to the url in both 2.0 and 2.1 for thumbnails - I think you're comparing a thumbnail link to an image link above.

The 2.1 upgrader doesn't really do any magic for the attachments.  It renames them (adding a .dat at the end to solve some issues) but there's no real magic via the upgrade.  If your 2.1 environment works & your 2.0 environment doesn't, it may be environment related. 

More questions:
- How does your CPU chart look?
- Any error messages in your apache log? 
- Any error messages in your SMF error log?
- Any errors in your browser console (usually F12 & click on the console link or anything red...)?

Does the behavior change when you press refresh the screen?   (usually F5)
Does the behavior change when you do a hard refresh?   (usually shift-F5)

Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 25, 2019, 01:09:07 PM
If you want to audit your attachments in depth, to diagnose an issue, here is a list of things to look at...

Start with a message id, in these examples I used 179083:
select id_attach, id_msg, filename, id_folder, file_hash, fileext, mime_type
from smf_attachments
where id_msg = 179083;


If you look in your attachment folder on disc, you should see the file, named <id_attach>_<file_hash>

It might help to look at the message, to ensure that the topic in the image link matches the topic on the message:
select id_msg, id_topic
from smf_messages
where id_msg = 179083;


Finally, look at your folder structure, two ways:

In the app, look under Admin | Forum | Attachments and Avatars | Attachment Settings and click on the "Configure multiple attachment directories" link. 

What you see should correspond to the result of this query:
select variable, value
from smf_settings
where variable = 'attachmentUploadDir';


You may either see a single, simple folder, or a serialized list of folders. 

If you see a single, simple folder, than the id_folder on ALL your attachments should be 1.  And only ever 1.  This query should return nothing:
select * from smf_attachments
where id_folder != 1;


If you see a list of folders like:
a:2:{i:1;s:28:"/my/path/attachments";i:2;s:29:"/my/path/attachments2";}

That tells you that you have 2 folders. The i:# corresponds to the id_folder you should see on the attachment record.

If this all lines up properly, then there isn't an issue with storage of your attachments.

Hope this helps... 
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 01:14:46 PM
Quote from: shawnb61 on November 25, 2019, 12:34:59 PM
The ";image" is added to the url in both 2.0 and 2.1 for thumbnails - I think you're comparing a thumbnail link to an image link above.

Yep, you're right, I just took a second look. In Chrome there's no visible graphic for the missing thumbnail so I couldn't tell. I'm attaching a view of the Abby attachment as seen in Safari instead of Chrome.

Quote from: shawnb61 on November 25, 2019, 12:34:59 PM
More questions:
- How does your CPU chart look?
- Any error messages in your apache log? 
- Any error messages in your SMF error log?
- Any errors in your browser console (usually F12 & click on the console link or anything red...)?

Does the behavior change when you press refresh the screen?   (usually F5)
Does the behavior change when you do a hard refresh?   (usually shift-F5)

• What is a CPU chart? Assuming it's my computer's, I'm on Mac. But I'm not the only one having the problem, it was pointed out to me by a new member in Korea.
• Apache log: Sounds like this would be with my hosting... I'm not that technical. I did find an Errors area in my cPanel, am attaching a txt document with a small sampling.
• SMF error log: nothing other than occasional forgotten passwords.
• Browser console errors: again not sure what that is, but back in Chrome I was able to look in the JavaScript Console and just got this after clicking the attachment link: Failed to load resource: the server responded with a status of 404 ()
•Refeshing the screen or changing browsers changes nothing, but then again I'm not the only one having the issue. I cloned my forum the other day to test the attachments Integrity Check and the bad links carried over to the test site.

"Sir Osis" joined my forum this morning, said he would take a look around from the inside tonight. We'll find out if he sees the same issues.

Quote from: shawnb61 on November 25, 2019, 01:09:07 PM
If you want to audit your attachments in depth, to diagnose an issue, here is a list of things to look at...

Thank you, very detailed information. I'll work on this today and get back with any new discoveries.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 25, 2019, 01:26:37 PM
The CPU chart I'm looking for is for your hosted computer.  Sometimes they max out and strange things happen.

Look around in cpanel.  It's important to watch the CPU.  If you can't find it, your host should be able to show you where it is.

Let's see if the audit turns up anything...



Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 01:46:59 PM
The only thing I found in the cPanel labeled CPU was this, hopefully that's what you're talking about. I just want to make sure you know that the attachment problem is not new, it's just that I only recently found out about it from a new member. Attachment links prior to 07/16/18 are broken and while I haven't looked at every attachment since that date, the newer ones seem okay from what I've seen so far. If there was a CPU problem on 07/16/18 I doubt there'd be a record of it any more.

I'll also take a look at the links in the Attachment browser this afternoon, randomly checking attachments dated after 07/16/18 to see if they're all functional.
Title: Re: Bad links for SOME attachments
Post by: Illori on November 25, 2019, 01:49:11 PM
did anything that you can recall happen in July of 2018? server move/server crash etc?
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 02:21:32 PM
Quote from: Illori on November 25, 2019, 01:49:11 PM
did anything that you can recall happen in July of 2018? server move/server crash etc?

No, not that I can think of. I mentioned in my post back here (https://www.simplemachines.org/community/index.php?topic=570401.msg4037068#msg4037068) I even thought maybe an update or something:

"I looked at dates in the Package directory thinking maybe I did a patch or something around 07/06/18 that would affect the db, but no. 2.0.12 and .13 were installed Feb 2017. 2.0.14 and .15 were installed 08/20/18."

I don't know of any server crashes, no moves. My forum has been on the same hosting/server since Feb. 2017. I have a few Wordpress sites hosted in that same public_html directory and they are all fine, were never offline as far as I know.

Since the database controls everything, you'd think there would be visible evidence of some sort of differences in the attachment table between working and non-working links.
Title: Re: Bad links for SOME attachments
Post by: Illori on November 25, 2019, 02:25:28 PM
the database does not control everything. for examples attachments are in a folder on your server, they are partly controlled by the database but if not found on the server you will run into the issue you are facing now.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 02:33:58 PM
Gotcha, thanks. Yes they are in the folder. When this first began I downloaded the Attachments folder, was able to identify the first two "missing" attachment files, add the appropriate extension (jpg) so I could open them in Photoshop, save as a jpg and reattach since a member wanted to see them.

When I'm going through all the other stuff this afternoon—shawnb's audit steps and randomly checking the newer attached after July 201—I'll also compare the files in the attachment dir with the Attachments browser list and database. I won't be able to check every one of them, but enough to get an idea if the "missing" ones are actually in the dir.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 25, 2019, 07:22:47 PM
Quote from: shawnb61 on November 25, 2019, 01:26:37 PM
Let's see if the audit turns up anything...

So far I've only checked one attachment thoroughly, it took quite a bit of time and I'll check a couple more tomorrow.

Example from post 12857, dated 061919, attachment #2146 HillHouse.jpg [404 error]

In current Attachment Dir (total 1,627 files as of today):   
2146_436898194c0c8184112ce8407ebe11623ae74bb9.dat 06/29/19

In upgraded site (1,615 files, older tally from 11/14):
2146_436898194c0c8184112ce8407ebe11623ae74bb9.dat 11/14/19

In current Attachment Browser, on pg. 8 of 20 pages:
HillHouse.jpg 720x540  246.57kB Deb   June 19, 2019, 08:32:12 AM
in The Hill House 5 views

In upgraded Attachment Browser. pg. 25 of 66 pages:
HillHouse.jpg 720x540 246.57KB   Deb June 19, 2019, 03:32:12 pm
in The Hill House 2 views (upgrade may have set back to zero)

Checked the "Configure multiple attachment directories" and there was only one folder, the correct one /speakingofseth/attachments. It did say 1636 files and then Files Missing (repair) which I was afraid to click. Since I'm doing this on a test site, I may just click it tomorrow. I can always restore the site.

Went through the database thru the control panel, every attachment has id_folder as 1, also all approved 1.  id_member are mostly 0, just the avatars have a real member number. The number of attachments matched the number of attachments in the directory.

I'm done for the day, I'm out of ideas and need to be somewhere else anyway.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 25, 2019, 08:41:57 PM
Look into some old ones, before July 2018.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 25, 2019, 08:48:12 PM
Just got on, will have a look.  Thinking about this while eating my supper (and having a few beers) I don't think there's anything wrong with your database or attachment files.  Have you tried connecting your production db to a clean 2.0.15 install?
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 25, 2019, 10:41:46 PM
Were the images here - https://speakingofseth.com/index.php?topic=530.msg8610#msg8610 - all attached at the same time?  None display thumbs, but the thumb icons and links work on some, not others.
Title: Re: Bad links for SOME attachments
Post by: aegersz on November 25, 2019, 11:40:45 PM
Quote from: Sir Osis of Liver on November 24, 2019, 04:31:53 PM
The different attachment counts is something I've seen before, and the primary reason I don't trust the maintenance task.  In your db screenshot some of the mime types are incorrect.  Any correlation with missing attachments?

You don't trust it ? I found it very reliable and have used it (in Dev) to remove attachments when i deleted members via the database (i know, i was experimenting).

I think you can safely run it without fear BUT having said all that, it's a big deal so I feel your fear.

EDIT: I just ran it on my live system and it fixed 7 reported file size errors and it gave me the option to do so prior than to just automatically fixing things so there's your safety net.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 26, 2019, 10:48:18 AM
The attachment integrity check deletes attachment records it finds confusing, e.g., if an attachment folder got changed somehow.  When dealing with some issues, it can make a bad situation much worse.

It can be helpful routine maint when things are setup properly.  But not when diagnosing issues.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 10:57:24 AM
Quote from: Sir Osis of Liver on November 25, 2019, 08:48:12 PM
Have you tried connecting your production db to a clean 2.0.15 install?

No, that's a great idea though. I'll do that today on another test site.

Quote from: Sir Osis of Liver on November 25, 2019, 10:41:46 PM
Were the images here - https://speakingofseth.com/index.php?topic=530.msg8610#msg8610 - all attached at the same time?  None display thumbs, but the thumb icons and links work on some, not others.

I had to switch over to Safari to see the thumb missing image icons. Yes, Attachment browser says all were attached at the same time--10:30:02 on Feb 14, 2017. The first three are bad, the next four are ok (except for the missing image icons), the last two are bad.

Quote from: shawnb61 on November 25, 2019, 08:41:57 PM
Look into some old ones, before July 2018.
Quote from: Sir Osis of Liver on November 25, 2019, 08:48:12 PM
I don't think there's anything wrong with your database or attachment files.

I'll go ahead and do the audit on some of these particular images anyway since they're before July 2018. I originally thought that was the day separating which attachments functioned and which ones didn't, but came across that later one which makes me think there are more bad links that I first realized. Especially when I saw that the Attachment browser on my production site shows 20 pages of attachments, and the upgrade 2.1 test AB shows 66 pages. So more than 2/3 of my attachment links aren't working.

I'll update after I've done the 2.0.15 clean install and the audit of some of the attached files (screen capture).

Quote from: shawnb61 on November 26, 2019, 10:48:18 AM
The attachment integrity check deletes attachment records it finds confusing

Yep, that's what it did to mine.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 01:48:19 PM
UPDATE: I think I know what's going on. In viewing the Attachment folder from my live site Speaking of Seth on my computer, in Mac Finder, under file "kind", some files were labeled as documents and some were labeled as TextEdit.app Document, which stood out. The ones that were labeled as TextEdit did not have the .dat extension on the file name. See 1st attachment. These are the ones that "worked" in the associated messages—the ones missing the extension. The ones with .dat extensions were the ones that don't work, at least in the 15 or so attachments I've been investigating.

I looked at the Attachments folder for the test site I'd upgraded to 2.1, and all the files have the .dat extension. But the links also work (as far as I can tell, I have't looked at every single one). The upgrade somehow fixed them. See 2nd attachment. All functional attachments on my Seth forum, from July 14, 2019 to today, do not have the .dat ext. I have no memory of anything happening on July 14.

Right now I have some other work I need to get done, but this afternoon I will do the clean install of .15 and see if that fixes the links. If not, since the files with .dat are not recognized, I'll experiment by manually removing the extensions from a few bad link attachment files to see if that fixes anything.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 26, 2019, 02:04:19 PM
The .dat extension is added as part of the 2.1 upgrade. 

In 2.0, the .dat MUST NOT be present; in 2.1, the .dat MUST be present.  That's why the 2.1 upgrade works better - some of your files already have that extension. 

The very first thing I'd try is to simply remove the .dat in 2.0 on a trial attachment or two & see if that works.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 02:31:59 PM
Quote from: shawnb61 on November 26, 2019, 02:04:19 PM

In 2.0, the .dat MUST NOT be present...

The very first thing I'd try is to simply remove the .dat in 2.0 on a trial attachment or two & see if that works.

Thank you Shawn!

Wow then I wonder how they got in there to begin with? I'll definitely try the extension removal test. If I have to go that route, it will take some time since there are so many attachments, but from the Attachments browser tallys it seems that about 1/3 of my attachments may have the extension. That's a lot better than 2/3.  ???

I'll update later today.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 26, 2019, 02:45:59 PM
Don't do that by hand.  Once you confirm it works, do the rename via a wildcard.

Of course, back everything up again first.  Again.  Twice.
Title: Re: Bad links for SOME attachments
Post by: aegersz on November 26, 2019, 02:48:33 PM
Quote from: shawnb61 on November 26, 2019, 10:48:18 AM
The attachment integrity check deletes attachment records it finds confusing, e.g., if an attachment folder got changed somehow.  When dealing with some issues, it can make a bad situation much worse.

It can be helpful routine maint when things are setup properly.  But not when diagnosing issues.

I see. Good point. maybe have the delete function as an added option one has to check box it, one day ?
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 02:57:55 PM
Quote from: shawnb61 on November 26, 2019, 02:45:59 PM
Don't do that by hand.  Once you confirm it works, do the rename via a wildcard.

Of course, back everything up again first.  Again.  Twice.

I've become a Master Backer Upper, lol. Not being very familiar with the technical aspects, I guess I don't understand—the file names only need to be changed in the Attachments folder, correct? I don't see a way to search and replace in the File Manager of the cPanel, although I could ask the host for advice.

Does anything need to be changed in the database? Skimming visually through the Attachments table, the images just have the names without the .dat extension. Even a search turned up no .dat extensions.
Title: Re: Bad links for SOME attachments
Post by: shawnb61 on November 26, 2019, 04:35:29 PM
The files need to be renamed in the file system.  The host should be able to help. 

If not, check back.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 05:06:16 PM
Quote from: shawnb61 on November 26, 2019, 04:35:29 PM
The files need to be renamed in the file system.  The host should be able to help. 

If not, check back.

OK, this is very exciting for me. I figured out a way to fix it in less than 10 minutes. In case anyone else ever needs to do this (god forbid), and with no waiting for the host company to answer a support ticket: After I put the forum into Maintenance Mode,

1. I downloaded the Attachments folder (once again).
2. Opened it on my Mac.
3. In Finder/Preferences, I checked Show all filename extensions; uncheck Show warning before changing an extension.
4. In the Attachments folder, I selected all, then right clicked: I chose Rename x items; Find: .dat  Replace with: (blank); clicked Rename.
5. I renamed the original Attachments folder in the site directory and uploaded the newly edited one.

All of the attachments I've checked so far, various dates, are alive and well. Life is good.

Thank you so much for your help, I never could have gotten this figured out if it wasn't for all the replies from you and others at SM. I know you all have personal lives and jobs, and your devotion to Simple Machines is very obvious. Honestly, last night I was starting to feel like this was a problem that would never be solved. After 3+ weeks of stressing over this, I can finally get on with my life.  ;D

Case closed.

Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 26, 2019, 05:07:41 PM
Don't see any files with .dat extensions in /attachments or /attachments2 so you're good.  One thing I noticed, your /attachments directory reports 9998 files in FileZilla.  There may be more than that, some ftp servers are configured so they'll show you 9998 files max.  Files are still there and will work in SMF, but you won't be able to see them or manage them in ftp client.  Most cpanel file managers are extremely slow when dealing with that many files, so they're pretty much useless when you're up over 10k files.  This may also be affecting the file counts you see in attachment file maintenance.  If you have a decent host, they should be able to reconfigure ftp server to give you a complete listing.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 05:17:34 PM
Quote from: Sir Osis of Liver on November 26, 2019, 05:07:41 PM
your /attachments directory reports 9998 files in FileZilla.

Huh, is this message for me? I'm really confused. You were able to ftp into my directory? 'Splain yourself, lol. I don't have 9998 attachments, only 1626.
Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 26, 2019, 05:40:31 PM
Oops, no, that's not you.  Working on three forums right now, getting a bit too old for multitasking.  (Getting?  Already got there. :P)  Any idea how the .dat extensions were added to your attachments?  Were you tinkering with 2.1 at any point?
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 06:05:19 PM
Quote from: Sir Osis of Liver on November 26, 2019, 05:40:31 PM
Oops, no, that's not you.  Working on three forums right now, getting a bit too old for multitasking.  (Getting?  Already got there. :P)  Any idea how the .dat extensions were added to your attachments?  Were you tinkering with 2.1 at any point?

I figured as much, lol. I was just surprised someone else was dealing with .dat issues, or did I send you ftp info in my sleep?

I've been wondering how that whole situation came about myself. I know quite a while ago I did a test 2.1 upgrade, in a separate directly, but that should not have affected my production site unless I messed something up with the settings. I honestly can't see me uploading an Attachments folder backup from a 2.1 site into my 2.0 one unless I got something mixed up. I'm very careful these days.

I hear you on the multitasking, there are days when I think I should just throw in the towel.



Title: Re: Bad links for SOME attachments
Post by: Sir Osis of Liver on November 26, 2019, 06:13:37 PM
2.0 never added a file extension to attachments, the .dat extension was added in 2.1 to address a problem with FileZilla.  Any files with the extension would had to have been attached in a 2.1 install, and somehow found their way to your 2.0 production forum.
Title: Re: Bad links for SOME attachments
Post by: SethStudent on November 26, 2019, 06:15:29 PM
It will remain a mystery.  8)