News:

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

Main Menu

Converting from phpBB2.08 to SMF - Attachment problem

Started by Gargamel, May 10, 2005, 03:44:04 PM

Previous topic - Next topic

Gargamel

Hello there!

Conversion from my old phpBB2.08 with attachment mod 2.39 to smf went fine, users, topics, forums, avatars, everything converted without trouble. The only problem are the attachments. First I had to manually rename the attachment-folder of my phpBB, because the converter always looked for a folder named "files" but the folder was called "board-files".

After doing that the attachment conversion went through without any errors. Lots of attachments do work, but some are displayed with a size of 0kb and if I want to open them I get a 404 error. The appendant files are in the "attachments"-folder of smf, but for some reason not correct linked. I couldnt figure out any system why some attachments are broken. File size, upper or low-case filenames or special charakters, some of them work, some not. What went wrong?


Miraenda

Do you have a link to your forum for people to see this in action? Also, do members have to be registered to see this? If so, you may want to provide a test account for people to not have to register to troubleshoot it for you.

Gargamel

Forum-URL: http://wiwi-board.junkyard.name/smf/ [nofollow]

user: fixit
pass: fixit

Its a board with German-university-stuff. You can see only one of the attachment-forums. The two attachments of the first topic (Spieltheorie|Weise|SS05|Mitschriften) work like they should. But the attachment of the second topic (ReWe2|Mack|WS2004/05|Lernkontrolle TeilIII Aufgabe 12) is broken like I wrote above.

This board is just a test-board, the original phpBB is still intact, so You cant break anything.

jsdoyle

I also have this problem.  I converted a phpBB 2.0.17 board to SMF 1.05.

Some image attachments display, some don't.  Other attachments show 0k and I get a 404 error when I click on them.

Any ideas?

[Unknown]

The phpBB converter for SMF 1.0.5 may have some trouble depending on the attachment filename.  What filenames are not converting properly?

-[Unknown]

Gargamel

I´ll quote myself:

Quote from: Gargamel on May 10, 2005, 03:44:04 PMI couldnt figure out any system why some attachments are broken. File size, upper or low-case filenames or special charakters, some of them work, some not.

Maybe jsdoyle can figure something out. I had to manually reupload over 100 attachments because I couldnt fix this problem. But it was worth the trouble, smf works like a dream.

jsdoyle

This is bugging the hell out of me.

I convert my phpBB 2.0.17 install to smf 1.05.  No errors reported.  I convert my attachments no errors reported.  SMF attachment manager show 509 attachment at approximately 94000 KB (I have my attachment folder limit set to 2,000,000 KB prior to the conversion).

I go to my newly converted smf board and I look at the posts and about half (various file types including .doc and .jpg) show as being 0 KB and clicking the attachment results in a 404 error, file not found. 

So, I check via ftp and in the attachment folder all of the attachments are there and they show their normal file sizes.  Also, I suspect this is normal but all files have a long random string of numbers and letters appended to the end of all file names.

If I go to SMF attachment manager and click on the recount link it reduces the number of total attachments to 297 but the size of the files doesn't change.  Then when I go back to view the posts with the 0 KB attachments  all of the attachments have been removed from the posts!

But the remaining 297 attachments work fine.

This is screwed up!  I need to get this board converted ASAP.

Any suggestions from the support staff would be greatly appreciated!

The board I'm converting is at www.afte.org/phpBB2/index.php and the new one is at www.afte.org/forum/smf1/index.php.

I'm still working on them so the new one may be in various stages of repair!

Thanks,

Scott

jsdoyle

#8
Okay, I've got it figured out.  Big Bug in SMF!

All attachments get converted.  They are listed in the database with the correct file size and all.

But!  SMF doesn't like attachments that have spaces in their filenames.  So it displays all attachments with spaces in the file name prior to the recount as having 0 KB and it won't load it.

Do a recount of the attachments and SMF removes all references to attachments that are either 0 KB or ones that have spaces in the filenames.

The attachments aren't deleted from the attachment folder but simply removed from the database attachment table.

The structure of the smf_attachments table is fine and all attachments are listed (names with and without spaces) prior to the recount.

So, we need a fix for imported attachments that have spaces in thier filenames.

I just posted two attachments after recounting.  One with a space in the filename and one without.  Both display fine when uploaded within SMF.  So it likes spaces as long as they are attached from within SMF.

Advertisement: