XF 1.2 Import attachment problems with XF to XF

DJ XtAzY

Active member
I have a bunch of posts with about 4 to 10+ attachments of various file types (let's assume all txt documents) from the source XF's db. After import, for some reason the target XF's posts only have at most 1 to 3 attachments. In other words, let say a post has 40 attachments (Text1.txt, Text2.txt, ... , Text40.txt); after import it only has at most 1 - 3 attachment (Text5.txt, Text11.txt, Text 19.txt).

Data and internal_path are entered correctly.
 
I have a bunch of posts with about 4 to 10+ attachments of various file types (let's assume all txt documents) from the source XF's db. After import, for some reason the target XF's posts only have at most 1 to 3 attachments. In other words, let say a post has 40 attachments (Text1.txt, Text2.txt, ... , Text40.txt); after import it only has at most 1 - 3 attachment (Text5.txt, Text11.txt, Text 19.txt).

Data and internal_path are entered correctly.
This may sound silly, because you said the directory is correctly chmod, but I noticed on 1 shared account I did for someone else... That they needed all the files within those folders to also be 777.

It maybe something worth trying.
 
I have a bunch of posts with about 4 to 10+ attachments of various file types (let's assume all txt documents) from the source XF's db. After import, for some reason the target XF's posts only have at most 1 to 3 attachments. In other words, let say a post has 40 attachments (Text1.txt, Text2.txt, ... , Text40.txt); after import it only has at most 1 - 3 attachment (Text5.txt, Text11.txt, Text 19.txt).

Data and internal_path are entered correctly.
Also be sure the attachment settings are the same on your target.... ie... If the site you're importing from allows for X number of attachments, but your target only allows for Y number of attachments; I have seen this conflict.

In other words, if the site you're importing from allows 3 attachments per post, but you're importing into a site that has the setting to allow for only 2 attachments... I've seen this issue. The target must be equal or greater.


You also want to have your add-ons disabled as any add-on that may manage attachments can conflict as well.
 
Last edited:
Tried all that. Source db has all addons disabled. Source and target have the same attachment settings. Everything imported fine except the attachments.

Here's my source database. You can easily tell there are 16 attachments to that post:
source.webp

Here's my target imported db. You can see that at most a post has about 1-2 attachments:
target.webp
 
Source db has all addons disabled.
Target also needs add-ons disabled as well. Since after all that is the site which is going to process all this while being imported (you can turn them on again later).

Have you verified that the post, themselves, are missing the attachments ? I ask because your photos above are not comparing the same post / threads.

Just finally.... Have you rebuilt your cache (which you need to do after finishing any import for everything to be in sync). I ask that because a lot of people like to "check in" as the progress happens, but everything is not so clear until you've completed it (common mistake people do).
 
The target is a fresh install of XF so there are no addons and existing posts\threads\forums etc. Completely empty. So essentially I'm simply mirroring the boards during the import. So therefore, i should see a 10+ rows with the same content_id back to back. You can see that in the target db there are indeed back to back rows with the same content_id, but that is at most 2.

And yes I verified a bunch of posts aren't missing attachments. I clicked over 100 attachments and they are all downloadable. Yes I rebuilt the cache too. By simply comparing two internal_data folder, the target one only contains 14% of the original one. Again bother folders are 0777, same ownership, etc.

I feel like there's a bug somewhere in the attachment import. I mean why would every post have at most 2 attachments.
 
Last edited:
The target is a fresh install of XF so there are no addons and existing posts\threads\forums etc. Completely empty. So essentially I'm simply mirroring the boards during the import. So therefore, i should see a 10+ rows with the same content_id back to back. You can see that in the target db there are indeed back to back rows with the same content_id, but that is at most 2.

And yes I verified a bunch of posts aren't missing attachments. I clicked over 100 attachments and they are all downloadable. Yes I rebuilt the cache too. By simply comparing two internal_data folder, the target one only contains 14% of the original one. Again bother folders are 0777, same ownership, etc.

I feel like there's a bug somewhere in the attachment import. I mean why would every post have at most 2 attachments.
The folders are 0777, but I hope you followed my original advise and made the files within it also 0777 (I've seen it once were this was needed). I also hope you have chmod not only /internal_data/ but also the /data/ folder (and files within).

Without looking at this myself.... This maybe a bug as you suspect.

I don't think anyone has tried the importer on a fresh install. Most people are looking to import an established community into another established community. And that has been successfully done.

cc: @Mike
 
I see the possibility of a bug, but I think it should cause duplicates rather than skips.

If you get the import to the attachment stage and submit FTP/admin CP info via a ticket, I can look into it.
 
The folders are 0777, but I hope you followed my original advise and made the files within it also 0777 (I've seen it once were this was needed). I also hope you have chmod not only /internal_data/ but also the /data/ folder (and files within).

Without looking at this myself.... This maybe a bug as you suspect.

I don't think anyone has tried the importer on a fresh install. Most people are looking to import an established community into another established community. And that has been successfully done.

cc: @Mike

Yup i already made folders and files to 0777 using the simply chmod command recursively. This time i created 2 test fresh installations. Then I created two threads on the source with 8 attachments each. Imported to the target one. Not all attachments went through for each of the threads.

I'll send a ticket soon.

Edit: Ticket sent.
 
Last edited:
Top Bottom