FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Converters » Converting phpBB2 w/mail2forum posts
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Converting phpBB2 w/mail2forum posts [message #168378] Thu, 25 April 2013 00:03 Go to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Problem 1:

I'm putting this into a separate thread because I believe I'm experiencing have to do with the fact that my board has been successfully running mail2forum for several years. When importing emails from "strangers" (those on a mailing list, but not subscribed to the board), we chose to have those messages imported as Anonymous, but with the username set to their full name from their email. The result is that the topics and messages are imported with the userID anonymous.

It appears that the convert.php script is not importing these messages. The number of messages in my forum after the conversion is roughly the number of messages that have real user ids associated with them (~24K). The number of messages missing is roughly the number that were created with the anonymous id.

Problem 2:
I get to the "import topic descriptions" section and I get the following:
Fatal error: SQL error has occurred!

If I look at the log, I see this message:
?419       ?1366847591?(/home/username/FUDforum/include/theme/default/db.inc:104<br />
/home/username/public_html/ff/convert.php:532<br />
/home/username/public_html/ff/conversionmaps/phpBB2.map:255<br />
/home/username/public_html/ff/convert.php:875<br />
) 1062: Duplicate entry '18738-94191' for key 'PRIMARY'<br />
Query: INSERT INTO fud30_thread_notify (user_id, thread_id) VALUES(18738, 94191)<br />
Database version: 5.1.68-cll<br />


And then it exits. I'm not sure what I'm missing out on here.

Question 1:

Is there any kind of table that is created that would show me old forumid/postid and new forum/postid? I'd like to build a 301 redirect script from my old board to my new one.
Re: Converting phpBB2 w/mail2forum posts [message #168381 is a reply to message #168378] Thu, 25 April 2013 01:07 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Turns out I was right. I opened the phpBB2 database with phpMyadmin and changed the user id for Anonymous to 1 instead of -1, then I changed all the topics and posts that were owned by -1 to be owned by 1, and voila! They all imported.

This is a case that should probably be handled by the converter, no?

As to my Question1, it appears that the topic/message ids are identical! Yay! That will make it easier to make a redirection script to redirect my 200K posts to their new home.
Re: Converting phpBB2 w/mail2forum posts [message #168387 is a reply to message #168381] Thu, 25 April 2013 07:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Untested, but this should fix the problem:
http://fudforum.svn.sourceforge.net/fudforum/?rev=5606&view=rev
Re: Converting phpBB2 w/mail2forum posts [message #168388 is a reply to message #168387] Thu, 25 April 2013 07:19 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Thanks for the quick coding! So this addresses the -1 user id problem?

Any thoughts on these two problems?

- fud30_thread_notify conflict at the end

- 650 instances of one or the other of these two errors:
Notice: Uninitialized string offset: 1071 in /home/<username>/FUDforum/include/theme/default/post_proc.inc on line 431
Warning: strpos(): Offset not contained in string in /home/<username>/FUDforum/include/theme/default/post_proc.inc on line 447

I'll be happy to test the new code. I have to perfect the import/conversion process, because it's a very active forum and I'll have to keep it down during the import process.
Re: Converting phpBB2 w/mail2forum posts [message #168468 is a reply to message #168388] Fri, 03 May 2013 17:04 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, it will fix the -1 user id problem.

I'm unable to simulate the fud30_thread_notify conflict. Will need a dump of your forum or access to a test server if you want to take it further.

Warnings and notices can probably be ignored. If you find specific messages that are messed up after the conversion, we can investigae futher.
Re: Converting phpBB2 w/mail2forum posts [message #168497 is a reply to message #168468] Sun, 12 May 2013 07:01 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
The -1 fix worked like a charm.

The fud30_thread_notify issue was that there was no validation (or validation did not work) in phpbb2 that should have restricted a user from subscribing to a same topic. This created duplicate records in the _topics_watch table.

The following changes to the phpBB2 map fixed the issue.
//commented line no 249 and replaced it with the line below
$c = bbq('SELECT * FROM '. dbpref .'topics_watch GROUP BY user_id,topic_id HAVING notify_status=0');

[Updated on: Sun, 12 May 2013 07:01]

Report message to a moderator

Re: Converting phpBB2 w/mail2forum posts [message #168507 is a reply to message #168497] Mon, 13 May 2013 03:45 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
I have almost successfully run this tool against my current system. Your fix addressed the -1 userid problem and my fix addressed the thread_notify problem.

I now get the following error when I run it. Based on my understanding of what it is doing, I think I'm OK, but I thought I'd report it notheless.

Import private messages...
PHP Notice: Undefined variable: ADD_ADMIN in /home/cpreston/public_html/forum/convert.php on line 911

Notice: Undefined variable: ADD_ADMIN in /home/cpreston/public_html/forum/convert.php on line 911

[Updated on: Mon, 13 May 2013 04:44]

Report message to a moderator

Re: Converting phpBB2 w/mail2forum posts [message #168513 is a reply to message #168507] Mon, 13 May 2013 12:59 Go to previous message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
On further examination, about 1% of my messages were not imported. (3000 out of 300K). Not THAT big of a deal in the overall scheme of things, but because the tool doesn't give me any log of any messages it could not import, I am unable to troubleshoot the problem.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: JForum Conversion to FUDForum
Next Topic: phpBB2 to FUDforum converter
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Apr 28 00:22:20 GMT 2024

Total time taken to generate the page: 0.02814 seconds