Advertisement:

Author Topic: Converting from IPB 2.3.1 to SMF - need to test first  (Read 9322 times)

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #20 on: May 14, 2018, 09:10:24 PM »
HELP! Stuck again:
   
Converting...
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll logs... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting permissions...Field 'description' doesn't have a default value

I've looked and the only two places "description" shows up in the sql script is in converting boards and smileys - and this is supposed to be in permissions. Can't find it. It's at step 1, substep 9. If I try to go to substep 10, it just complains again about the

The bit in the converting boards section is:

Code: [Select]
SUBSTRING(description, 1, 65534) AS description,
and the section in smileys is:

Code: [Select]
if (!empty($rows))
convert_insert('smileys', array('code', 'filename', 'description', 'smiley_order'), $rows, 'replace');

Meanwhile - all our members seem to be imported, and if you go into the statistics section of the board, you can see the topics that are supposed to be there, but clicking on anything gives you "Board structure corrupt: unable to find parent board" which isn't surprising considering we're not through the conversion yet.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #21 on: May 14, 2018, 09:14:21 PM »
Check that smf_boards table the desciprtion has a default value set even if it is just "" JUST CAN't be null
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #22 on: May 14, 2018, 09:17:17 PM »
So I looked and there are 12 boards (all imported from IPB) - one has no entry in the description field. Should I just put something in there?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #23 on: May 14, 2018, 09:24:54 PM »
alter the database and allow null records and have default value for that column in smf boards table
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #24 on: May 14, 2018, 09:31:01 PM »
You're assuming I know how to "allow null records and have default value for that column in smf boards table" - do I need to edit the conversion script? If so, how?

I'm assuming you're referring to this bit in "Converting Boards"? Right now it says:

Code: [Select]
SUBSTRING(description, 1, 65534) AS description,
I have altered the database - it only had the one empty description field in the moderators. That hasn't let me restart the conversion where I left off though.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #25 on: May 14, 2018, 09:33:40 PM »
Try running this sql command on your SMF database
Code: [Select]
alter table smf_boards change description description varchar(255) null default '';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #26 on: May 14, 2018, 09:37:36 PM »
I get an error when I do that. #1406 Data too long for column 'description' at row 1

Not sure what I'm to do with that...it IS a long description - should I shorten it and try again?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #27 on: May 14, 2018, 09:43:30 PM »
Lets make it bigger
alter table smf_boards change description description varchar(2048) null default '';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #28 on: May 14, 2018, 09:45:25 PM »
MySQL returned an empty result set (i.e. zero rows). I actually shortened the descriptions anyway - there were actually 2 it thought were too long with the previous command. And they were kind of wordy!! ;)

So - what next?

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #29 on: May 14, 2018, 09:53:58 PM »
Now when I restarted - put it back a step to step 8, because it wouldn't do anything otherwise, I'm back to only 30,000 posts...where there were 140,000 before I did that (in SMF - there are over 200,000 in IPB) I'm not worried about losing a few, but this is getting silly.

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #30 on: May 14, 2018, 10:44:36 PM »
So I restarted the conversion. And now we're right back at the same spot. I don't know if the conversion script needs editing or not.

Code for the board description bit (again):

Code: [Select]
SUBSTRING(description, 1, 65534) AS description,
Also found this thread: https://www.simplemachines.org/community/index.php?topic=422752.0 - so I've asked my host to disable MySQL Strict Mode temporarily, in case that works.

BTW - in the database the post count is back up to 132,000 in SMF - so we're missing some 77,000 from IPB. Topic count is 26,252 (SMF) vs 27,356 (IPB).
« Last Edit: May 14, 2018, 11:29:52 PM by PaddyD »

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,104
  • Gender: Male
    • Macedonian electronics forum
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #31 on: May 15, 2018, 08:40:50 AM »
That and a whole boatload of others - I'm wondering if anyone wants my modified script when I'm done? LOL...

That would be appreciated. Others will surely benefit from it ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #32 on: May 15, 2018, 10:08:50 AM »
So - my host cannot make changes to PMA on a shared server. (hadn't thought about that aspect of things - but makes sense)

So...I need to know how to make that script work, because it won't right now.

How do I edit

Code: [Select]
SUBSTRING(description, 1, 65534) AS description,
to make the "Converting members... 'Field 'description' doesn't have a default value" error go away and let me complete the conversion??

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #33 on: May 15, 2018, 01:33:41 PM »
I would take out SUBSTRING(description, 1, 65534) AS description,
And see if it converts and the description refer4ence in the .sql file
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #34 on: May 15, 2018, 01:34:59 PM »
That's what I'm trying right now, actually. Will let you know if it works...

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #35 on: May 15, 2018, 06:08:21 PM »
Well...I've now got a forum with almost all the topics, but the contents of all the posts are missing. EVERY single one I've checked so far. In the database, the messages are listed, but the message body is empty. :( I just ran it again, this time only running the convert posts section of the script, and it did the best job yet of importing everything - except the darned post body for each message. I'm missing about 1200 posts, but out of 209,802, I can live with that.

I need a merge script to merge the post from IPB with the empty "body" field in SMF, based on the post ID #. I'm not sure if I can figure out how to do that myself...I figure I know just enough to be dangerous in PMA. ;)

Signatures are screwed up (weird bits of HTML) but that is easily fixed.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,501
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #36 on: May 15, 2018, 07:17:50 PM »
Does it look empty when you look in the body? in smf_messages?

You might be able to update statement to copy from existing db to the new db
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #37 on: May 15, 2018, 07:30:09 PM »
Does it look empty when you look in the body? in smf_messages?

You might be able to update statement to copy from existing db to the new db

Oh yes, very empty indeed. If I could figure out how to copy from the existing db to the new one, I'd do it - but I'm afraid my database coding skills are minimal at best. Both the IPB and the SMF data is in one database - I installed SMF into the IPB db since that was mentioned in a few places as one way to do it, and I was certainly having a lot of trouble getting rolling. I was planning on dropping the IPB stuff once we were up and rolling. I did download the two posts tables into Excel to see what I could see in a slightly friendlier format - there are definitely post number anomalies somewhere - things missing in the SMF section (1200 posts in all).

Anyway - if someone can figure out how to write a script to copy the IPB post to the SMF body with the corresponding post ID, in PMA, I'll be grateful. I would imagine it's not difficult, but I get lost pretty quickly in trying to figure it out by reading online manuals.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,104
  • Gender: Male
    • Macedonian electronics forum
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #38 on: May 15, 2018, 08:03:33 PM »
Have you tried with the SQL scripts posted on page 7 of the official support thread? Because some things differ from parts of the script you posted and the ones attached there.

Code: [Select]
SUBSTRING(description, 1, 65534) AS description, position AS board_order,
https://www.simplemachines.org/community/index.php?topic=238557.120
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline PaddyD

  • Semi-Newbie
  • *
  • Posts: 29
Re: Converting from IPB 2.3.1 to SMF - need to test first
« Reply #39 on: May 15, 2018, 09:04:40 PM »
The problem is knowing which version is actually the most recent. ;) But the line you're showing is the same in both the version I used and the version you're referencing (I just didn't copy the last bit of it, since it wasn't the issue).

Anyway, the only thing I would like to still do is get the 200,000+ posts INTO the darned database - everything but the post itself is there. It's there in the IPB part of the database - so all I need is some bit of scripting that says "if post ID=x for both ipb_entry and sml_entry, then copy post content from ipb_entry to sml_entry." I don't know the correct syntax for that.