1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Import attachment problems with XF to XF

Discussion in 'Installation, Upgrade, and Import Support' started by DJ XtAzY, Nov 13, 2013.

  1. DJ XtAzY

    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.
  2. Adam Howard

    Adam Howard Well-Known Member

    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.
  3. Adam Howard

    Adam Howard Well-Known Member

    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: Nov 13, 2013
  4. DJ XtAzY

    DJ XtAzY Active Member

    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:

    Here's my target imported db. You can see that at most a post has about 1-2 attachments:
  5. Adam Howard

    Adam Howard Well-Known Member

    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).
  6. DJ XtAzY

    DJ XtAzY Active Member

    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: Nov 14, 2013
    Adam Howard likes this.
  7. Adam Howard

    Adam Howard Well-Known Member

    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
  8. Mike

    Mike XenForo Developer Staff Member

    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.
    Adam Howard likes this.
  9. DJ XtAzY

    DJ XtAzY Active Member

    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: Nov 14, 2013
    Adam Howard likes this.
  10. Adam Howard

    Adam Howard Well-Known Member

    Thanks Mike.
  11. DJ XtAzY

    DJ XtAzY Active Member

    Just letting you guys know that Mike fixed a couple of bugs. All my attachments imported correctly now. Maybe this thread should get moved to resolved bugs forum. Thanks!
    Adam Howard likes this.
  12. Adam Howard

    Adam Howard Well-Known Member

    Thanks for the update.

    Always good to hear bugs being fixed.

Share This Page