Advertisement:

Author Topic: Error converting phpbb3 to smf 2  (Read 19101 times)

Offline toolbox

  • Semi-Newbie
  • *
  • Posts: 20
Error converting phpbb3 to smf 2
« on: November 08, 2009, 08:28:23 AM »
I get this error message and don't know what to do next, can anyone help please.
Converting from phpbb3 to smf 2 rc1.

Converting boards...Wrong value type sent to the database. Integer expected. (id_cat)

narqelion

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #1 on: November 08, 2009, 09:30:43 PM »
What converter did you use, i.e. where did you get it, off the downloads page or buried somewhere here in the forums?  Also what version of phpBB3 are you converting from ?  :)

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: Error converting phpbb3 to smf 2
« Reply #2 on: November 08, 2009, 10:08:37 PM »
For converting from phpbb3 to SMF 2.0 please try using the attached files instead.
narquelion is right, there were a number of bug fixes in the 2.0 converters which are not yet included on the converters available on the downloads page.
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline toolbox

  • Semi-Newbie
  • *
  • Posts: 20
Re: Error converting phpbb3 to smf 2
« Reply #3 on: November 10, 2009, 03:15:53 PM »
Many thanks all running now using enclosed files.

Offline vad710

  • Newbie
  • *
  • Posts: 4
Re: Error converting phpbb3 to smf 2
« Reply #4 on: December 05, 2010, 09:46:13 AM »
Sorry to be necroing a thread, but where are these files maintained? so that I can be sure to get the most recent version?

The other thread, is dated Jan 2008

Offline vad710

  • Newbie
  • *
  • Posts: 4
Re: Error converting phpbb3 to smf 2
« Reply #5 on: December 05, 2010, 09:48:54 AM »

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: Error converting phpbb3 to smf 2
« Reply #6 on: December 05, 2010, 09:53:08 AM »
Yes, the latest versions available should be on the download site, and normally those should be updated as necessary.
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline vad710

  • Newbie
  • *
  • Posts: 4
Re: Error converting phpbb3 to smf 2
« Reply #7 on: December 05, 2010, 10:25:07 AM »
Not sure if this is the right place for it, but I am getting an error on line 740, it's trying to execute this query: "SHOW CHARACTER SET"

I tried to execute that on myphpAdmin and it would not execute either. I did look up the query on the MySQL Website and it is a proper database query. I am assuming that maybe my database user account does not have access to characterset inforamtion?

Is there some modification i can make to the script to make it work? Can I default to a specific character set?

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #8 on: December 05, 2010, 01:23:52 PM »
huh, your  MySQL-Version is propably outdated (4.0 or lower)..
untested but it should work, in convert.php find:
Code: [Select]
// Get a list of character sets supported by your MySQL server.
$result = @mysql_query("
SHOW CHARACTER SET;");
$db_charsets = array();
while ($row = mysql_fetch_assoc($result))
$db_charsets[] = $row['Charset'];
replace with:
Code: [Select]
// Get a list of character sets supported by your MySQL server.
$db_charsets = array('latin1');

Offline vad710

  • Newbie
  • *
  • Posts: 4
Re: Error converting phpbb3 to smf 2
« Reply #9 on: December 05, 2010, 04:31:04 PM »
Thanks, that seemed to get me further along, though now I am running into this:

Converting posts...The database value you're trying to insert does not exist: modified_name

Offline Frankenstine

  • Newbie
  • *
  • Posts: 7
Re: Error converting phpbb3 to smf 2
« Reply #10 on: January 02, 2011, 10:16:37 AM »
Same problem.
Code: [Select]
...
Converting topics... Successful.
Converting posts...The database value you're trying to insert does not exist: modified_name
Forum's db was originally phpbb2, converted to phpbb3, now i want to goto smf2.

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #11 on: January 02, 2011, 12:03:49 PM »
mhh, maybe we can fix it.. in phpbb3_to_smf.sql find:
Code: [Select]
$row['body'] = stripslashes($row['body']);add after:
Code: [Select]
if(empty($row['modified_name']))
    $row['modified_name'] = 'Guest';

Offline Frankenstine

  • Newbie
  • *
  • Posts: 7
Re: Error converting phpbb3 to smf 2
« Reply #12 on: January 03, 2011, 04:43:41 AM »
It's working, thanks, but that was not single place where error has been occur.
Code: [Select]
Converting posts...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)...The database value you're trying to insert does not exist: from_name
And, result of converting messages: every message, never edited, after converting become edited by guest at 01 January 1970, 03:00:00 am. That is not good enough, I think it must be set to edited by post author and time set to original post time or something another but still having sense.

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #13 on: January 03, 2011, 07:50:15 AM »
ok, please find (in phpbb3_to_smf.sql):
Code: [Select]
---* {$to_prefix}personal_messagesadd after:
Code: [Select]
---{
if(empty($row['from_name']))
    $row['from_name'] = 'Guest';
---}

Offline Frankenstine

  • Newbie
  • *
  • Posts: 7
Re: Error converting phpbb3 to smf 2
« Reply #14 on: January 14, 2011, 02:04:27 AM »
Yes, it's work! Converting complete.
Found issues:
* Every post has "Last edited at 01 January 1970, 03:00:00 am by Guest", if it was never edited
* Permissions are messed up, for boards and for users, user even can't enter to profile settings (maybe needed to have administrator login if "target" SMF, not existent in "source" phpbb3, to fix permissions after converting? I'll try to do so). AFAIR, this is "documented behavior". Did I need to apply "phpbb3 password fix"? Forum seems to permit user login, but telling "password sheme was changed" or something like this (I used localized engine).
* Attachments don't converted. Seems it supposed to work.
+ Avatars are converted! In topic "phpbb3 to smf converter" avatars are in "won't convert" list.
« Last Edit: January 14, 2011, 02:19:25 AM by Frankenstine »

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #15 on: January 14, 2011, 02:27:01 AM »
- SMF 2.0 (RC4) should support your old phpBB passwords by default ,no need to install the login fix.
- permissions are AFAIK not part of the converter
- the "edit by" issue is fixable via phpMyAdmin, just execute this sql statement:
Code: [Select]
UPDATE smf_messages SET modified_name ='' WHERE modified_name ='Guest';

Offline Frankenstine

  • Newbie
  • *
  • Posts: 7
Re: Error converting phpbb3 to smf 2
« Reply #16 on: January 14, 2011, 04:40:20 AM »
Oh. shi... :) I was wrong, converting was not successful. Stopped at step 2 substep 11, as I see. Error from mysql was displayed in wrong charset, and I didn't figured out that it is error report in first look. Now i converted message and get explanation (translation to english):
Code: [Select]
Recalculating forum statistics... Duplicate key name 'ip_index'So, to converting of attaches script maybe simply not reached? :)

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #17 on: January 14, 2011, 05:40:27 AM »
no problem, there are two known bugs in convert.php, please check:
http://www.simplemachines.org/community/index.php?topic=242961.msg2867944#msg2867944

Offline Frankenstine

  • Newbie
  • *
  • Posts: 7
Re: Error converting phpbb3 to smf 2
« Reply #18 on: January 17, 2011, 04:27:59 PM »
Thank you! Now its done without any errors.
Still one question - what about attachments? :) I see only string like
[attachment=4:1fmd5jpu]p0001.jpg[/attachment:1fmd5jpu]
instead of attached images and no links to download attachment. Is it broken?

ThorstenE

  • Guest
Re: Error converting phpbb3 to smf 2
« Reply #19 on: January 19, 2011, 02:20:33 PM »
phpbb attachments should be converted, but they are by default only visible to regular members.. as a guest you can't see attachments.
the above strings seems to be a placeholder for inline attachments? we could remove these lines, just edit phpbb3_to_smf.sql and find:
Code: [Select]
$row['body'] = preg_replace('~\[size=(.+?)px\]~is', "[size=" . ('\1' > '99' ? 99 : '"\1"') . "px]", $row['body']);add after:
Code: [Select]
$row['body'] = preg_replace('~\[attachment(.+?)\](.+?)\[\/attachment(.+?)\]~is', '', $row['body']);