Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Import


  • connielk
    Participant

    @connielk

    The custom import instructions say “any” SQL database. Just checking to see if that includes Microsoft SQL as well as MySQL? I assume just a port number change to 1433? And will it work with a url for the Microsoft SQL server on a remote server rather than LocalHost? Anyone tried importing from DotNetNuke?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Where does it say that? πŸ˜‰ I just changed it to MySQL πŸ˜‰

    https://codex.bbpress.org/import-forums/custom-import/

    Take a look at the following for some reading material to help get you going.

    Importing from DotNetNuke Active Forum

    The basis of what ended up being used is here.

    Mix all that in with this on converting from Microsoft SQL to MySQL (This was Access but the same tools should do MSSQL fine)

    Documented import from snitz access database

    Let me know how that all goes for you and I will follow up with more πŸ™‚


    connielk
    Participant

    @connielk

    I had a sneaking suspicion.

    So…

    I converted my microsoft sql databases to mysql by exporting from mssql into csv and then importing into a new database on my wordpress hosting with phpMyAdmin. Then I modified the sample you pointed to above as “basis of what ended up being used” to match my table structures. Then I tried the import. It doesn’t error, but it says there are no forums to import, no topics to import, etc.

    What’s the next step to see why it’s not importing anything? Could it be a connection issue?


    connielk
    Participant

    @connielk

    The forum import page automatically puts in the wordpress admin username and password. When I ran it with that, it says there was nothing to import. So I tried it again using my cpanel login which should be a sql login and now it’s got a growing line of dashes across the screen. It’s been running for over 30 minutes and there are less than 200 posts, so I’m not sure what it’s doing. Is there anything I can check to see what it’s doing? If anything?

    Hard to tell if it connected or not. Would be nice if it would tell that it is beginning a connection, then when it connects, or that it has failed to connect.

    I’ll let it run for a while and report back the results.


    connielk
    Participant

    @connielk

    An hour later and it still adding dashes. It says

    ——————————————————— etc etc
    Starting Conversion

    So… I posted my code to github. If you don’t mind taking a look I’d really appreciate it.

    https://gist.github.com/anonymous/7267096

    Everything looks pretty good πŸ™‚

    I could only see the one issue

    You have:

    // Forum parent id (If no parent, then 0. Stored in postmeta)
    $this->field_map[] = array(
    'from_tablename' => 'forum_forums',
    'from_fieldname' => 'ForumGroupID',
    'to_type' => 'forum',
    'to_fieldname' => '_bbp_forum_parent_id'
    );
    

    And this should be either 'from_fieldname' => 'ParentID', or 'from_fieldname' => 'GroupID'

    I tried it again using my cpanel login which should be a sql login and now it’s got a growing line of dashes across the screen. It’s been running for over 30 minutes and there are less than 200 posts, so I’m not sure what it’s doing. Is there anything I can check to see what it’s doing? If anything?

    This looks right in that using your cPanel login, I would double check your webhost help section to confirm what your MySQL user/pass are (You can also grab these typically from your WordPress wp-config.php file via FTP.

    The ‘——–‘ is a horrible bug that happens more than I would like but debugging this has been a pain to say the least and I haven’t been able to find what causes it yet alone a fix for it. Typically logging out and logging back in ‘seems to fix it’ most of the time.

    With all that said though if you can get past that ‘bug’ then it looks like you are good to go.

    EDIT: With ~200 posts the whole process should be completed in under 5 minutes.


    connielk
    Participant

    @connielk

    After I posted the code to you, I saw and fixed the ForumGroupID to ParentID. However I got the same result of dashes. But it seems logging out and then back in helps. Now I have some data.

    Here’s what I’m seeing:

    I got topics and replies but not the forums themselves.

    I got code in the bodies. See this page http://redhorsecrm.com/forums/topic/windows-v8-1-and-redhorse-v5-6/
    It seems the data in the body field in the posts table looks like this and it doesn’t display as html in the web:
    <p style="text-align: left;">&.. etc etc

    The users are all anonymous. How does the user import actually work? This is a new site and I was planning on importing users with Members Import and then having a welcome email sent to them telling them their account has been migrated from the old site to the new site. Do I need to wait until after I do that to import the forums so that the users already exist or can I import the forums now and then import the users. Not sure what order to do that in without knowing how this forum import works with users.


    connielk
    Participant

    @connielk

    Hm. Seems I must need to wrap that. This is what the body looks like in the table before importing:

    <p style=&quot;text-align: left;&quot;>&..

    Here is what it looks like displayed on the page:

    <p style="text-align: left;"> 


    connielk
    Participant

    @connielk

    Geez. I guess that didn’t work either. Let’s try this.

    & l t ; p & g t ; I

    I’ve added a space between every character to see if it will not try to mess with it.


    connielk
    Participant

    @connielk

    Making some progress here.

    I have forums now.

    I also have topics and posts. But the topics aren’t linked to the forums.

    I did some updates on the body of each topic and post to take care of the bad html. The posts look good now.

    2 questions remaining: how do I get the posts linked to the topic and forum? I ran the repair options and that didn’t fix it. And what happens with users per my question above?


    connielk
    Participant

    @connielk

    The code that the other dnn conversion used actually pointed to the ParentPostID and should have pointed to the ThreadID as the parent. Once I fixed that, I got forums, topics and replies all linked up correctly.

    Only remaining issues is users.

    Cool, things look good on your site now πŸ™‚

    For the users simply check the following box when you are importing your forum πŸ˜‰
    Convert Users - Attempt to import user accounts from previous forums
    (Yes, you will have to reset bbPress and run your import again https://codex.bbpress.org/reset-forums/)


    connielk
    Participant

    @connielk

    Amazing thing that you make this possible. Fantastic to be able to customize it and once it’s set up correctly, it works great. Thanks for all of your help!!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar