Skip to:
Content
Pages
Categories
Search
Top
Bottom

Split: Import from snitz access database


  • maddogmcewan
    Participant

    @maddogmcewan

    Hi hope u r all well… I downloaded github version and followed steps as described

    – Converted 2000 MDB with Bullzip Converter
    – Imported sql dumpp into new table
    – Cleaned out Forum Topics and Replies and then imported data into those two tables with datefixed
    – Ran Forum Import

    Success on

    – Created users
    – I can see all the forum topics and replies in the DB, post meta an posts, and buddypress activity tables are full of all my imported data with dates

    BUT i i see no forums under forums in admin, no topics under topics and when i try to load replies the server just about dies….

    I have tried Forum Toll repairs a few times – but does not seem to do anything – as in i cannot see any forums, categories or topics in frontend or admin – yet all the data is in wp_postmeta
    and wp_posts

    Any ideas?

    Moderator Edit: I split this topic from its original topic here:

    Documented import from snitz access database

Viewing 5 replies - 1 through 5 (of 5 total)
  • HI @maddogmcewan, as per my note above, I split this to a new topic as there are sure to be a couple of things that will get confusing if we continued in that same topic.

    To start with you should take a look in your wp_posts table, you should be able to find bbPress three custom post types forum, topic, and reply in the post_type column.

    1. Check if you indeed have some post types forum in your wp_posts table.
    2. Now find a topic in the wp_posts table, look at the post_parent, the ID of that field should relate to one of the ID values of the actual forums you found in step 1.
    3. Replies are the same, find a reply, look up the post_parent and check if a topic with that same ID exists.

    I’m expecting you have some mismatched data from your import and it is a matter of digging in to find what is broken in the data relationships.


    maddogmcewan
    Participant

    @maddogmcewan

    @netweb, Hi Stephen – Thank you for assisting… OK to answer the 3 questions

    1. Yes have many many entries in wp posts and post meta (image 1 is imported into bb)
    2. I attach images to show, (image 1 is imported into bb) Rest of images are from the mdb import after it has been imported into MySQL – i have the SQL dump file if u need it
    3. Post Parents are all 0 !!!!!!!!!! yet if i look in the original imported DB in mySQL (see images) all post parents, forum ids, etc are present…. Seems it fails to “convert” that data when it does the script import. I also notice that only replies imported, no forums were created or topics….. yet the data eg topics and forums do exist see images below in mySQL after initial MDB import

    Imported data in MySQL before running script import into bb. To show you that links exist to topics/categories and forums.




    Thanks for the screenshots, indeed it looks like no forums or topics are actually being imported.

    A quick look at your forums_forum` table leads me to the following in how the forum section of your custom importer should look like, it is not complete as you have more data that what I could see in the screenshot you posted.

    
    
    		/** Forum Section *****************************************************/
    
    		// Forum id (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'forum_id',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_forum_id'
    		);
    
    		// Forum parent id (If no parent, then 0, Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'cat_id',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_forum_parent_id'
    		);
    
    		// Forum title.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'f_subject',
    			'to_type'        => 'forum',
    			'to_fieldname'   => 'post_title'
    		);
    
    		// Forum slug (Clean name to avoid conflicts)
    		$this->field_map[] = array(
    			'from_tablename'  => 'forum',
    			'from_fieldname'  => 'f_subject',
    			'to_type'         => 'forum',
    			'to_fieldname'    => 'post_name',
    			'callback_method' => 'callback_slug'
    		);
    
    		// Forum description.
    		$this->field_map[] = array(
    			'from_tablename'  => 'forum',
    			'from_fieldname'  => 'f_subject',
    			'to_type'         => 'forum',
    			'to_fieldname'    => 'post_content',
    			'callback_method' => 'callback_null'
    		);
    
    		// Forum dates.
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_date',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_date_gmt',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_modified',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_modified_gmt',
    			'default'      => date('Y-m-d H:i:s')
    		);
    

    If you modify your forum section per the above I think you will find you will now have forums imported, if you have a more detailed i.e. “full” view of the forum data I can help work out what elese we can add for a more complete import, the same goes for topics, if you can add full screenshots of ALL the rows in your forums_forum and forums_topic tables I can work out what else needs to be added 🙂


    maddogmcewan
    Participant

    @maddogmcewan

    Sincere apologies for the delays Stephen – tried the fix above – moment it starts the concersion it says

    No topics to convert
    No forum parents to convert
    No forums to convert
    Starting Conversion

    so looks like it wont import the forums i can pm you or email you access to the DB if u wish?

    Give this a try, it should work for you now 😉
    https://gist.github.com/ntwb/a1108513e7382272cfc8

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