News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Attachments problem

Started by Snow-Man, March 24, 2023, 01:07:06 PM

Previous topic - Next topic

Snow-Man

hello guys,
im just uploaded my old attachments forum through FTP, i did paste all of them inside 'Attachments' folder
and want i tried to test the attachments, i found out it doesnt work
anyone know how to fix that?
all of attachments has been uploaded and path fixed through settings

Sir Osis of Liver

If you uploaded attachments from a 2.0 install into a 2.1 install, attachments won't work because 2.1 upgrade adds .dat extension to all attachment filenames.  If you've run the upgrade without attachments present, they won't have the extension and won't load.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

When you upgrade,  everything MUST be in place before starting to upgrade properly.

This includes attachments,  avatars, and smileys

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Snow-Man

Quote from: Kindred on March 24, 2023, 02:50:36 PMWhen you upgrade,  everything MUST be in place before starting to upgrade properly.

This includes attachments,  avatars, and smileys


im setting up old attachments from backup after doing upgrade.php, is it a problem?

Arantor

Yes, it is a problem: it won't work.

2.1's upgrade involves *renaming all the attachment files*. So they need to be there before you start the upgrade. The upgrade is intended to take a normal working 2.0, running in place, and turn it into a normal working 2.1 running in the same place.

Snow-Man

Quote from: Arantor on March 24, 2023, 04:52:44 PMYes, it is a problem: it won't work.

2.1's upgrade involves *renaming all the attachment files*. So they need to be there before you start the upgrade. The upgrade is intended to take a normal working 2.0, running in place, and turn it into a normal working 2.1 running in the same place.
i run the upgrade.php again but still getting file not found

Arantor

So you have the 2.0 database with the 2.0 files and the 2.0 attachments, then put the 2.1 files over the top and then run the upgrader?

Any other combination won't work. That's what Kindred was trying to tell you - you can't just magically fix bits of it randomly, and upgrade.php won't fix it this after the fact.

Snow-Man

is there a solution for that? so i can make attachments works back again

Arantor

So what setup do you currently have, 2.1 files, 2.1 database, 2.0 attachments and no backup from before the upgrade?

Snow-Man

Quote from: Arantor on March 24, 2023, 05:22:31 PMSo what setup do you currently have, 2.1 files, 2.1 database, 2.0 attachments and no backup from before the upgrade?
SMF 2.0.19 backup on latest smf version

Arantor

So restore the database backup, with all the files and attachments in place, then rerun the upgrade to do everything in one go, not parts of the upgrade.

Snow-Man

Quote from: Arantor on March 24, 2023, 05:30:25 PMSo restore the database backup, with all the files and attachments in place, then rerun the upgrade to do everything in one go, not parts of the upgrade.
i have already did the backup and i got everything like how it was before, and i have found the attachments file on the posts but when i try to download that file. it takes me to new tab and says File not found.

EDIT:
attachments loaded fine, i found all attachments on Admin panel -> Forum - > attachments and avatars -> Browse Files that means all files has been loaded
but when i try to download the file from the post i get File not found.

Snow-Man

#12
is it a problem about filing this field on repair_settings?
Exports Directory: - because i found out this field is empty
EDIT:
thank  you everyone for helping me, i have found out how to solve it.
i was reading this https://github.com/SimpleMachines/SMF/pull/7568 and it helped me

mrnuke

Fixed it.

There was an table in the database 'Expire_date' from an old mod.
I removed it and Attachments and avatars finally work again.
Www.ctguntalk.com CT's hottest Firearms, Politics and News Social Site.

Kindred

Quote from: mrnuke on March 27, 2023, 11:59:31 PMFixed it.

There was an table in the database 'Expire_date' from an old mod.
I removed it and Attachments and avatars finally work again.

?? ?? ??
You are not the original poster nor have you had any input into the poster's issue... so what are you taking about?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: