Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Porter vBulletin 4.x import attachments, what am I missing?

pcchenardpcchenard New
edited November 2014 in Vanilla 2.0 - 2.8

I'm doing a test conversion of a vBulletin v4.2.1 forum into Vanilla 2.1.5. In vBulletin I changed the attachment type from MySQL storage to regular file storage. Then I ran Porter which created the export file. The export file did not contain any attachments, nor did I see any other zip files created by Porter that would contain the attachments. So, I manually copied the attachemnt folders/files into the Uploads/FileUpload folder (the plug-in was already enabled). Then I ran the import. Once the import finished I checked a couple of posts with attachments.

They look something like this:

[ATTACH=CONFIG]1925[/ATTACH]

And then below that there is a thumbnail which is a generic blank image. When hovering the mouse over the attachment it shows the original file name correctly but the path goes to the following folder:

uploads/attachments/8/4/6/0/1735.jpg (the original file type but the file name is not 1735.jpg) but my attachment files from vBulletin are all .attach and .thumb files.

The FileUpload plugin is v1.7.1, which I found in another discussion post after the v1.5.2 plugin wasn't working right. For some reason v1.7.1 is not on the official plugin page though.

What am I missing with this conversion process.. This is very frustrating. I'm really close to just dropping the idea of moving to Vanilla because I've spent days trying to work through stuff like this that shouldn't be so difficult.

Any help figuring this out would be greatly appreciated.

Answers

  • The porter cannot account for every extension and variation once used with vbulletin.

    if there is not the file name, there will be a vb table with the references in. You could do a search and replace based on that.

    grep is your friend.

  • Thanks. Is there info anywhere on how to go about doing such a thing? I don't have a lot of experience with mysql yet. I I'm assuming there is a way to pull the data from the database and also a way to use that data in a script to do the file renaming? There is no way I would be able to do it manually...there are thousands of file attachments.

  • if you have the original data I could do it for a fee.

    If you are interested PM me.

    grep is your friend.

  • LincLinc Detroit Admin
    edited November 2014

    Make a backup copy of your attachments.

    Run the porter again. This time add: ?attachmentpath=/your/path/to/attachments to the URL before running. This will rename your attachments to usable files.

    When it's done, move your attachments folder from vBulletin directly into the Vanilla uploads folder, NOT in the FileUpload folder.

    Lastly, get the NBBC addon and enable it on your Vanilla site.

  • @Linc said:
    Make a backup copy of your attachments.

    Run the porter again. This time add: ?attachmentpath=/your/path/to/attachments to the URL before running. This will rename your attachments to usable files.

    When it's done, move your attachments folder from vBulletin directly into the Vanilla uploads folder, NOT in the FileUpload folder.

    Lastly, get the NBBC addon and enable it on your Vanilla site.

    Thank you! I will give that a try.

  • Looks like you have your answer. No idea that was developed. I guess there are a fair few vb conversions.

    grep is your friend.

  • LincLinc Detroit Admin

    @x00 said:
    No idea that was developed. I guess there are a fair few vb conversions.

    Yes, we have some really great technical tools now, but the usability needs some work.

  • I have a search and replace and some phpBB conversion, BBCode to Html options on a porter fork, I could do a merge request if you want them.

    grep is your friend.

  • LincLinc Detroit Admin

    As a general rule, we try not to search-and-replace on databases. It's a recipe for headaches in the bigger picture because of huge datasets and unforeseen consequences. Generally we want to use NBBC / add to NBBC / get NBBC into core.

  • x00x00 MVP
    edited November 2014

    It doesn’t replace on the database, but it is an advanced feature for people who know what they are doing. So understand your position.

    grep is your friend.

  • Thanks again for sharing the potential solution. I will try it out tonight (managing websites & forums is not my real job) and I will report back.

    It would be awesome if you guys could update the documentation for Porter with this kind of information. I have spent countless hours trying to figure out how to make this work. Granted, I'm not a programmer, or a MySQL DB admin, but I'm sure a lot of others installing and managing forums aren't either and I"m sure anyone else migrating from vBulletin would find this information useful.

    Also, thank you very much for the quick replies. That says a lot about your commitment to the Vanilla community.

  • LincLinc Detroit Admin
    edited November 2014

    @pcchenard said:
    I have spent countless hours trying to figure out how to make this work.

    I was the very first person to convert vBulletin to Vanilla :D I think it took me 3 months just to get the basics. Probably a year to get files over the first time.

    It would be awesome if you guys could update the documentation for Porter with this kind of information.

    Funny you should mention that...

  • @Linc said:
    Make a backup copy of your attachments.

    Run the porter again. This time add: ?attachmentpath=/your/path/to/attachments to the URL before running. This will rename your attachments to usable files.

    When it's done, move your attachments folder from vBulletin directly into the Vanilla uploads folder, NOT in the FileUpload folder.

    Lastly, get the NBBC addon and enable it on your Vanilla site.

    It is finding the files but it is returning the following at the completion of running the porter:

    Checking files
    Missing files detected. See ./missing_files.txt for full list.
    Total missing files 1484

    And looking in my attachments folder it is not changing any of the file names like I was expecting it to.

  • LincLinc Detroit Admin

    What did you set as attachmentpath?

  • The attachment folder was in the same location as vanilla2export.php and my attachment path was /attachments. I know this had to be right because the first time I did it I had a longer path and it said (I don't remember the exact text) that it could not find the attachment location.

  • LincLinc Detroit Admin

    This is a really tricky corner of the Porter so it's hard to guess what the trouble is here. Did it create a missing_files.txt that you can look at? The paths in it should give you a clue what it's doing wrong if you compare it to where the files actually are within that folder.

  • Yes it did create a missing_files.txt file. I' haven't had a chance to compare it to the attachments folder yet though.

  • LincLinc Detroit Admin

    I rewrote the migration docs today. It should finish rebuilding docs.vanillaforums.com shortly I hope. In the meantime it's here: https://github.com/vanilla/vanilladocs/blob/master/docs/developers/importing/porter.html.md

Sign In or Register to comment.