2.1 upgrade fails attachments extension

Started by Sir Osis of Liver, June 23, 2022, 04:57:38 PM

Previous topic - Next topic

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

landyvlad

So I gather that there is an attachments issue which means now would not be the time to upgrade from 2.0.19 to 2.1.2

I gather the problem is due to be fixed in 2.1.3?

Am I correct as if that's he case, I'll wait.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

shawnb61

There is no known, documented, reproducible bug where a 2.1 upgrade loses pix.

OTOH, The upgrader is definitely sensitive to improper settings, e.g., if the attachment folders are incorrect.  This usually happens after a forum move, restore, or site restructure; under all such circumstances, you should run repair_settings.php prior to upgrading to ensure smf knows where your folders are - especially attachments.

You absolutely MUST be upgrading a fully working forum, with proper settings & folders, or bad things happen.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

There have been multiple reports of upgrade completing successfully but failed to add .dat extension to hashed attachment filenames.  Attachments aren't lost, they just can't be found.  It's fixed by manually adding the extension, then they're displayed correctly.  This glitch is often accompanied by failure to move uploaded avatars from /attachments to /custom_avatar. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

I cannot reproduce on an upgrade of a working forum.

OTOH, it's very easy to reproduce if you use the wrong folders for avatars & attachments.

If you can reproduce by any other means, please share!
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

I logged an enhancement request, to confirm the existence of the folders before the upgrade and to issue a warning if they are not found:
https://github.com/SimpleMachines/SMF/issues/7555
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Aleksi "Lex" Kilpinen

This could just be a simple case of bad server config, where attachments have at some point ended up owned by no-one, and the issue has been later resolved but the files have not been chowned correctly. I don't see either of those topics including any checks to error logs from the time of upgrade.
Speaking from experience here, that's a real issue with some servers...
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

The attached script has worked on several forums that had this problem.  If it were caused by server config or incorrect chown, wouldn't script also fail?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Probably yes, if one php script fails because of that, another shouldn't work any better. You do have a point there.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

landyvlad

So then assuming that I have a fully working forum, and take a back up first, then upgrading to 2.1.x shouldn't result in these issues. Is that correct?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

shawnb61

Quote from: landyvlad on October 04, 2022, 10:21:50 PMSo then assuming that I have a fully working forum, and take a back up first, then upgrading to 2.1.x shouldn't result in these issues. Is that correct?

Yep.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

landyvlad

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

shawnb61

Folder checks were added in 2.1.3.

Likely an overdue feature. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: