I am trying to migrate a 2.x phpbb board to a 5.x drupal. The phpbb board has a small database with only 271 posts (most are only a few sentences) and 35 users. The Drupal database is an local database during development, and the phpbb board is on a live internet site. I guess I can't connect directly to the remote internet phpbb database from the remote database. So I tried exporting using phpmyadmin. This went OK. On the improt to the drupal database I kept getting timeout errors. So I deleted all the phbb tables from the drupal database and tried again using bigdump (www.ozerov.de/bigdump.php), and this gives the following error...

Error at the line 3001: INSERT INTO `phpbb_search_wordlist` VALUES('competition', 1628, 0);
Query: INSERT INTO `phpbb_search_wordlist` VALUES('competition', 1628, 0);
MySQL: Duplicate entry 'competition' for key 'PRIMARY'

After a Google search, I tried deleting the phbb tables from the drupal database and then re-ran bigdump after changing target database from 'drupal' to a new database called 'phpbb'. This made no difference.

Any suggestions? Please?

CommentFileSizeAuthor
#2 screen.png28.19 KBdavid@thrale.com
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NaheemSays’s picture

Can you try to only get a dump of the minimum set of needed tables? if you go to admin/settings/phpbb2drupal, there should be a list of the required tables. (and when getting the data dump., turn off extended inserts too.)

The wordlist tables are not needed.

david@thrale.com’s picture

FileSize
28.19 KB

Thanks for the help. This helped me to dump the forum data into my development drupal database. When I tried running the import module I got loads of error messages. For import of users, the errors were like ...

user warning: Duplicate entry 'user_yim' for key 'name' query: INSERT INTO drupal_profile_fields (title, name, explanation, category, page, type, weight, required, register, visibility, options) VALUES ('YIM', 'user_yim', '', 'Contact', '', 'textfield', 0, 0, 1, 2, '') in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.

and...

user warning: Table 'drupal.drupal_phpbb2drupal_temp_user' doesn't exist query: INSERT INTO drupal_phpbb2drupal_temp_user (user_id, uid) VALUES (2 , 1) in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.

For categories I got ...

# user warning: Table 'drupal.drupal_phpbb2drupal_temp_forum' doesn't exist query: SELECT forum_id FROM drupal_phpbb2drupal_temp_forum WHERE forum_id = 8 in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.
# user warning: Table 'drupal.drupal_phpbb2drupal_temp_forum' doesn't exist query: INSERT INTO drupal_phpbb2drupal_temp_forum (forum_id, tid) VALUES (8, 131) in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.

For topics I got ...

# user warning: Table 'drupal.drupal_phpbb2drupal_temp_topic' doesn't exist query: SELECT count(*) FROM drupal_phpbb2drupal_temp_topic WHERE topic_id = 1 in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.
# user warning: Table 'drupal.drupal_phpbb2drupal_temp_user' doesn't exist query: SELECT uid FROM drupal_phpbb2drupal_temp_user WHERE user_id = 1 in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.

For each of the errors there were also green text correctly listing all the categories and saying the import had worked. For example for posts it said ...

    * Found 71 posts: Beginning Import
    * Successfully Imported posts
    * The were 202 loops executed
    * There 0 errors while importing posts

But below loads of red errors that start ...

# user warning: Table 'drupal.drupal_phpbb2drupal_temp_post' doesn't exist query: SELECT COUNT(*) FROM drupal_phpbb2drupal_temp_post WHERE post_id = 61 in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.
# user warning: Table 'drupal.drupal_phpbb2drupal_temp_user' doesn't exist query: SELECT uid FROM drupal_phpbb2drupal_temp_user WHERE user_id = 1 in D:\xampp\htdocs\drupal\includes\database.mysql.inc on line 174.

However, the users were listed in the Drupal user table. Likewise I got other similar database errors as I proceeded through the import options. However, on completion the forum structure and users seem OK in Drupal, but the posts and topics don't exist and the column for the number of posts all show zero - see attached screen shot. I'm getting closer, just need some more help.

NaheemSays’s picture

1. Have you had a look in the database to see if those tables exist?

2. Is it possible for you to migrate to Drupal 6 and try from there? I have done very little work with the drupal 5 version of the module.

3. If the tables exist AND you cannot move to drupal 6, it maybe an idea to try the import with NOT have the drupal tables prefixed with anything else - the prefixing may have caused issues due to bugs in the code. (keeep the phpbb tables prefixed with phpbb_ though)

david@thrale.com’s picture

Thanks for the ongoing help.

1. There are no tables with the prefix "drupal_phpbb2drupal_". However the "drupal_profile_fields" table does exist.

2. I'd love to go to D6. However, I use a module called tablemanager which is still at D5 (I'm hoping the author will crack the D6 version by the time I am ready to go live!).

3. I couldn't try step 3 as the tables don't exist.

One wild thought, If I downloaded D6 and used your latest plugin to import phpbb to the D6 forum, could I then import those D6 forum tables back into D5 forum tables?

Thanks again

NaheemSays’s picture

Probably not.

You will need to create the relevant phpbb2drupal tables etc, but that also does not seem to be the whole of it.

Trying uninstalling phpbb2drupal and Try disabling and then uninstalling the module followed by re installing it to create those tables. or create them in phpMyAdmin.

david@thrale.com’s picture

I tried the trick to get it to create the phpbb2drupal tables, even downloading the module again, with no luck. So next I need to create the following tables...

- drupal_phpbb2drupal_temp_user
- drupal_phpbb2drupal_temp_forum
- drupal_phpbb2drupal_temp_topic
- drupal_phpbb2drupal_temp_post

Any other table too?

When I create the tables, where do I get the details I need about field numbers and the names and settings for each field, etc?

Thanks

NaheemSays’s picture

You can get the details from the install file - that should have all the data in there.

Basically, each table has two int columns I think. (get their names from the install column a long with any other info)

NaheemSays’s picture

Status: Active » Closed (fixed)

closing old issues that are probably no longer relevant.

kamleshghate2008’s picture

Title: Migration problem » zero topics and zero posts after migration
Version: 5.x-3.0 » 6.x-1.5
Status: Closed (fixed) » Active

Sorry I'm not sure is this the right place to put my comments.
I am having the problem similar to this where I configured the phpbb2Drupal from admin section without any red error message but when I when I started porting of database from phpbb to Drupal database it missed some records. It missed a few users and topics. I had a large database of phpbb.

But after containing the records in these tables -

- drupal_phpbb2drupal_temp_user
- drupal_phpbb2drupal_temp_forum
- drupal_phpbb2drupal_temp_topic
- drupal_phpbb2drupal_temp_post

my Drupal forum is showing zero topics and zero posts in all forums just like the attached(by stuckagain) image is showing although these tables are containing good amount of data.

Please give me any suggestion.

NaheemSays’s picture

1. Did you port from a vanilla phhpbb2 system or one where phpbb2 was a "middle step" from a third forum?

2. Can you check the database to see if the database is imported? Have a look in the node and the comment tables to see if the actual data was imported or not (and do you remember any messages you got while importing - did they mention the number of topics/posts etc imported?)

3. If step 2 is correct, can you see to make sure the forum terms that are attached to the topics are in the correct vocabulary?

JeremyFrench’s picture

Status: Active » Closed (won't fix)

Mass close of D6 issues for this module as won't fix. Please see #1854186: Support for the 6.x branch.