XF 2.2 SMF 2.1 attachment import

siep

Member
We have SMF 2.1 and I have done a first test import.
Profiles, avatars, conversations and forum posts are imported succesful.

However, attachments are not imported, even though I had entered the correct path.
I have found out that the attachments, in the SMF folder, have an .dat extension.

Is the extension the problem? Is there a way to convert the attachment files so XF can import them?
 
Ignore the first post. I've done some research and understand now why the files are .dat.

But the problem remains - importing avatars and attachments are not successful.
It looks like the importer can not read the attachment directory.

Avatars
As for the avatars we have two directories:
/home/xxxx/public_html/avatars (which can users choose from the server)
/home/xxxx/public_html/custum_avatar (by user uploaded avatar)

The /avatars directory is prefilled and I have not changed this value.
I checked smf.php and both options (upload user or chose from server) are taken into account.
However, the /custom_avatar are not imported.

This brings me to the next subject, that is most likely causing the problem.

Attachments
Zero attachments have been imported.
The following value as path is predefined when configuring the importer:
{"1":"\/home\/xxxx\/public_html\/attachments"}

I changed this value to /home/xxxx/public_html/attachments since the prefilled value is not supported.
After several tries without succes of importing the attachments, I went to look in the database. (see screenshot)

I found the following: attachmentUploadDir and attachment_basedirectories has the same value as predefined.

To be honest, I do not understand why it has this format since the other directories are 'normally' formulated.

Moreover, I found that both the custom_avatar and the attachments are stored in the attachments table.
This explains why the custom_avatars are not imported?

I think because of the directory format ({"1":"\/home\/xxxx\/public_html\/attachments"}) the importer is not able to read the attachments table?

Can I safely edit the rows (attachmentUploadDir and attachment_basedirectories) to /home/xxxx/public_html/attachments (as /avatars etc. are also formulated that way)?
Or is there any other possible solution to import the attachments?

Thanks in advance!
 

Attachments

  • database.webp
    database.webp
    57.2 KB · Views: 7
  • predefined directory importer.webp
    predefined directory importer.webp
    26 KB · Views: 7
/home/xxxx/public_html/avatars (which can users choose from the server)
XF won't import those - it only imports avatars which members have assigned to their profiles.

I've never used the SMF importer.
Isn't there an option to define the paths when configuring it?
 
If the SMF importer is like the others, XF will attempt to determine the paths.

However, the attachment path doesn't look correct - try manually entering it similar to the avatar path.
 
If the SMF importer is like the others, XF will attempt to determine the paths.

However, the attachment path doesn't look correct - try manually entering it similar to the avatar path.
I have entered the 'normal' path: /home/xxxx/public_html/avatars, since the importer does not allow the predefined path.
 
Yes! The import of attachments was successful.
The problem: in the attachments folder the files were named "100_e70304151747dd0441ffbff1f88b208141b1f04e.dat"
I deleted the ".dat" at the end and this did the trick. :)

Next step, the avatars. These won't import yet.
In the avatars folder the file names are like this: "avatar_109_1554405787.png"
Do I have to delete the ".png" extenstion as with the attachments?
 
I also deleted the extensions of the custom uploaded avatars. File names are like: "avatar_109_1554405787"
It does not help unfortunately.

We have two folders for avatars:
1: /avatars (from server selectable avatars)
2: /custom_avatars (by user uploaded avatar)

I have done two imports, each with one of the paths.
Result /avatars:
The avatars selected from server are imported and shows up in profile of users who selected one.
The custom uploaded avatars are not imported at all.

Result /custom_avatar:
The from server selectable avatars are imported to "/data/avatars". However, the avatars does not show up in profiles.
The custom uploaded avatars are not imported at all. :o
 
Top Bottom