When I try to convert my board to 4.7, I'm getting several errors complaining that a db column doesn't exist.

When converting polls:
Unknown column 'polled' in 'field list'

When converting topics and posts:
Unknown column 'list' in 'field list'

It doesn't look like any of the polls were imported, but the other posts look ok. The topic and poll errors were all on ones with attachments.

Looking at 4.7's default SQL schema, it doesn't look like either of these columns are supposed to be there, although the conversion script expects them.

CommentFileSizeAuthor
#11 poll_phpbb2drupal.diff.txt3.05 KBbeginner

Comments

rkn-dupe’s picture

Version: master » 4.6.x-1.x-dev

Im getting a similair error. Using the 4.6 version of this script to go to a 4.7 drupal install from phpbb 2.0.21. Everything else is fine apart from this, the message i get when running the migration script is:

# user warning: Unknown column 'polled' in 'field list' query: UPDATE poll SET polled = ' _389_ _400_ _23_ _1_ _273_ _250_ _5_ _41_ _4_ _333_ _49_ _19_ _88_ _121_ _339_ _98_ _16_ _233_ _26_ _29_ _342_ _90_ _152_ _348_ _59_ _11_ _37_ _177_ _160_ _39_ _223_ _350_ _354_ _357_ _266_ _28_ _367_ _30_ _383_ _326_ _48_ _390_ _110_ _440_ _484_' WHERE nid = 5705 in /home/wwwenra/public_html/drupal472/includes/database.mysql.inc on line 120.

rkn-dupe’s picture

Version: 4.6.x-1.x-dev » master

Just to add more detail to my above post. Im actually using the CVS version of the script, not 4.6 as intially posted.

My problem is that no polls are being imported, i got the above message several times over the first time round when trying to import. If i try and do the import again (without cleaning DB) i get the following message:

# About to import 184 polls
# Could not find details of poll: 651
# Poll has already been imported - i get this one several times
# Successfully imported polls

Some of these polls show up in mydomain.com/drupal/poll - linked to the forum they are posted in - but they do not show up in the forums at alll.

Im not getting the list error mentioned above by Toe

rkn-dupe’s picture

Looking at the migration script i see it has this line:

/**
 * Imports phpBB polls into drupal
 * @TODO change to new poll structure
 */

Im guessing from doing a bit of googling that the table 'polled' in the drupal DB was recently upgraded and renamed 'poll_votes'.

Not sure if thats too simple an explanation tho!

rkn-dupe’s picture

This line seems to be suggesting that polled used to be a part of the poll table

db_query("INSERT INTO {poll} (nid, runtime, polled, active)

Which suggests the script is going to have to be quite heavily adapated to take into account the new table 'poll_votes'

beginner’s picture

hello,
sorry for the delay in replying.
I'll look more closely at this issue tomorrow, as I have more time.
What I don't have but probably would need is a test phpBB database to import from.
I didn't have any poll on my boards, so I couldn't test properly the poll import function.
If you are willing to share a dump of your DB, you may contact me.

rkn-dupe’s picture

Sorry i cant share a DB, but i imagine it could easily be replicated by a fresh phpbb install and just creating a couple of topics with polls.

Toe’s picture

If I get time I'll try putting together a cut-down copy of my database, with just a few examples of what's going wrong.

rkn-dupe’s picture

has anyone made any progress with this?

beginner’s picture

I'm waiting for a DB to test with.

rkn-dupe’s picture

I am doing one for you now :)

beginner’s picture

Title: DB errors converting to 4.7. » error when importing polls.
Status: Active » Needs review
StatusFileSize
new3.05 KB

Thanks for the DB.

Please test this patch.
The import works without error, but I need you to test the result thoroughly to make sure everything works as intended POST-migration.
Compare the results in polls in phpBB to the new polls in Drupal.

Please report back so that I know I can commit this.
Thanks.

beginner’s picture

since you are at it, can you test the imported registration date:
http://drupal.org/node/64681#comment-114752
It worked for me and for others, but this user is reporting something strange.
How does this work for you?
thanks.

beginner’s picture

btw, make sure poll.module is enabled :)

rkn-dupe’s picture

Thanks for that - can you tell me how to use the text file you have attached?

rkn-dupe’s picture

Well im trying to do the migrate now, import posts is not working this time. Its just carrying on loading for over 25 minutes.

I also got many errors when importing categories:

user warning: Table 'drupal2.phpbb2drupal_temp_forum' doesn't exist query: SELECT forum_id FROM phpbb2drupal_temp_forum WHERE forum_id = 1 in /home/libcom/public_html/library/includes/database.mysql.inc on line 120.
    * user warning: Table 'drupal2.phpbb2drupal_temp_forum' doesn't exist query: INSERT INTO phpbb2drupal_temp_forum (forum_id, tid) VALUES (1, 725) in /home/libcom/public_html/library/includes/database.mysql.inc on line 120.
rkn-dupe’s picture

have got it working again now. Will post up reports once i have had time to test :)

rkn-dupe’s picture

My posts table is running very slow at importing - we have 113393 posts and at the current rate its gunna take around 6 hours total to do it - is there a setting somewhere which could speed this up? Php settings or something?!

While im at it - in text encoding my phpbb tables are encoded as latin1_swedish_ci but there is no option in phpbb2drupal config to choose that so as to change it to utf8 - does this matter?

beginner’s picture

1) it seems you have figured out how to use the patch: tell me if it works.
2) the error messages: Table 'drupal2.phpbb2drupal_temp_forum' doesn't exist, are due to the fact that the phpbb2drupal module wasn't properly installed. Those tables are created when the module is enabled, so be careful when importing and DB.
3) re: speed, There is not much we can do with so many posts to import! A much earlier version imported 500,000+ records in about 40 minutes. This version is more complete, feature wise, so it might take longer: each post is dealt with individually. As long as it doesn't time out, you just need to be patient...
4) about the encoding, you may have problems if the encoding is not properly changed during the import. Please review the thread below and post there: http://drupal.org/node/67068 . See my question #8 in that issue: I may be able to do something about it, but I will again need a DB dump in that encoding to test with.
btw, what is the encoding of your phpBB page (as declared in the html page header)?

rkn-dupe’s picture

Thanks for the reply,

1. patch seems to work - i wasnt getting poll errors this time. Still not 100% sure tho. Wait and i will come back on that.
3. Yeah with speed, i guess it is patience, it took about 7hours to do 40K posts, so i need to find a time when i dont need my computer for a day or so to run the whole thing.
Do you know if its possible to 'top-up' a migration? I.e. if i run a migrate on posts, stop it half way through, then want to carry on later? Will it be able to recognise it has already done some, skip them and just carry on? I have tried, but i get an error saying 'Posts already imorted'.
4. My phpbb page says - iso-8859-1 - thats the same as the DB i gave you was set up as.

I will check your other thread. :)

beginner’s picture

3) halt and start again migration? That's a very tough feature request: are you willing to provide a patch for that :)
4) if the page is encoded as iso-8859-1, then I think the settings of the DB is irrelevant. Set the phpbb2drupal module to change the encoding from iso-8859-1 to utf8, and please confirm that it works as intended.

rkn-dupe’s picture

3) I was jut curious, rather than requesting, as doing polls import for a second or third time i get this message:

# About to import 188 polls
# Could not find details of poll: 651
# Poll has already been imported (x 500)

It doesnt matter about the poll it could nto find details of, it probably doesnt exist anyway. But as i saw that error message, i thought if that poll had been there the next time i ran the script, i guess it would have put it in. Therefore the same should work with posts - it would recognise how many posts to import, give me a message for however many saying they have been imported and import the rest. Anyway it doesnt really matter - just curiosity!
4) Will do!

beginner’s picture

Are you saying you have the message "Poll has already been imported" displayed 500 times?
This is certainly not normal and probably should be fixed, depending on what it is.

rkn-dupe’s picture

I was only getting that message the second time i tried to import polls, when they had already been imported.

However, polls have been imported to mysite.com/drupal/polls but they are not showing up in the forum at all. They are only showing up in the polls section, with comments and a link to the forum they were posted in. However they arent showing in mysite.com/drupal/forum at all. That isnt right is it?

rkn-dupe’s picture

Now i understand polls dont exist in forum in drupal. Ok.

Will comment again with any problems when i hit them. Thanks for your help so far :)

Toe’s picture

Title: error when importing polls. » DB errors converting to 4.7

E-mail sent with a test database.

beginner’s picture

Title: DB errors converting to 4.7 » error when importing polls

@Toe:
the errors you reported at the beginning of this thread were due to a bug when importing polls.
Please patch the module attached in this thread (#11) and see if you still experience those problems.

as for encoding problems, see the following thread:
http://drupal.org/node/67068
If you have still encoding problems, report back in that thread.

If you experience other problems besides poll import (which should be fixed with this patch) and encoding, please open another issue.

Toe’s picture

the errors you reported at the beginning of this thread were due to a bug when importing polls.

Read closer. I reported problems for more than just polls. Hence the title of the bug report wasn't "error when importing polls."

My results don't look much different after applying that patch.

Importing polls:
user warning: Duplicate entry '1155' for key 1 query: INSERT INTO poll (nid, runtime, active) VALUES (1155, 0, 0) in /home/blah/includes/database.mysql.inc on line 120.
(repeated over and over for all polls)

Importing topics:
user warning: Column count doesn't match value count at row 1 query: INSERT INTO files (fid, nid, filename, filepath, filemime, filesize) VALUES (1, 636, 'bike.jpg', 'files/bike.jpg', 'image/jpeg', 65221, 0) in /home/blah/includes/database.mysql.inc on line 120.
(repeated over and over for all threads with attachments)

Importing posts:
user warning: Column count doesn't match value count at row 1 query: INSERT INTO files (fid, nid, filename, filepath, filemime, filesize) VALUES (79, 0, 'bike.jpg', 'files/bike.jpg', 'image/jpeg', 65221, 0) in /home/blah/includes/database.mysql.inc on line 120.
(repeated over and over for all posts with attachments)

webchick’s picture

I also received the error discussed in the initial post, however enabling the poll module seemed to fix it.

Maybe separate out import polls" into its own separate thing like the "import private messages" part, or else add poll.module to the list of core modules that are checked to see whether they're enabled or not.

beginner’s picture

Status: Needs review » Active

I was kind of waiting for rkn to confirm that the patch works, but apparently, as long as it was working for him, he didn't bother coming back to say so.
So, the patch has just been committed.

Toe is right: there is indeed a problem with file attachments. I'll check that later, if I can, but I don't have a DB to test with. My phpBB didn't have any attachments, so I cannot reproduce the problem and check that any fix would work.

webchick suggestion is sound. I am making a different section is settings to ask about poll import. Thanks.

beginner’s picture

Status: Active » Fixed

both are now fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)