News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

IPB 2.0 -> SMF 1.12 Duplicate entry error ??

Started by CJUK, March 05, 2007, 07:41:28 AM

Previous topic - Next topic

CJUK

Hi

Hopefully someone can help.  I am trying to convert from IPB to SMF but can't get past the error.

SMF and IPB are on the same database and I am useing the lastest convert.php


INSERT INTO `safehav_tester`.smf_topics
(ID_TOPIC, isSticky, ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_POLL, numReplies, numViews, ID_FIRST_MSG, ID_LAST_MSG, locked)
VALUES ('767', '0', '27', '7', '8', '', '3', '16', '4234', '4263', '0'),
('769', '0', '24', '179', '179', '', '0', '13', '4248', '4248', '0'),
('770', '0', '5', '179', '179', '', '2', '65', '4249', '4286', '0'),
('771', '0', '24', '103', '103', '', '8', '72', '4252', '4321', '0'),
('774', '0', '27', '8', '1', '', '1', '9', '4265', '4277', '0'),
('776', '0', '26', '0', '1', '', '8', '78', '4283', '14106', '0'),
('777', '0', '36', '8', '32', '', '15', '116', '4292', '4639', '0'),
('778', '0', '27', '8', '8', '', '4', '22', '4300', '4355', '0'),
('779', '0', '5', '77', '0', '', '6', '63', '4307', '4440', '0'),
('781', '0', '5', '147', '1', '', '1', '41', '4313', '4343', '0'),
('782', '0', '2', '179', '103', '', '9', '102', '4314', '4735', '0'),
('783', '0', '5', '179', '85', '', '9', '92', '4315', '4495', '0'),
('784', '0', '11', '6', '6', '', '14', '119', '4316', '4756', '0'),
..........removed the middle of the error message so the length of the post was not so long.............
('1450', '0', '5', '1', '5', '', '4', '28', '9253', '9270', '0'),
('1451', '0', '11', '226', '32', '', '3', '65', '9265', '10089', '0');
Caused the error:

Duplicate entry '767' for key 1



Thanks
CJ

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

discipleoftheway

Having the same problem, I'm using the (presumably) latest IPB 2 converter from the SMF Converters downlaods section, dated Sunday, February 11, 2007, 6:32:24 AM  

CJUK

Sorry I didn't get back sooner jay - had to put my move on hold for a bit.

Still having the same problem with the convertor.  Using the file from this thread http://www.simplemachines.org/community/index.php?topic=149092.0


JayBachatero

Quote from: discipleoftheway on March 25, 2007, 01:30:37 PM
Having the same problem, I'm using the (presumably) latest IPB 2 converter from the SMF Converters downlaods section, dated Sunday, February 11, 2007, 6:32:24 AM 
You mean this[/ur] one?

Quote from: CJUK on March 26, 2007, 08:43:32 AM
Sorry I didn't get back sooner jay - had to put my move on hold for a bit.

Still having the same problem with the convertor.  Using the file from this thread [url="http://www.simplemachines.org/community/index.php?topic=149092.0"]http://www.simplemachines.org/community/index.php?topic=149092.0[/url]


Is the duplicate key always on 767?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

CJUK

Nope I tried changing the URL to hxxp:www.safe-haven.net/smf/convert.php?step=1&substep=7&start=770 [nonactive] but it stopped again a bit further on with the same error.

JayBachatero

I mean when you get the error does it always say? "Duplicate entry '767' for key 1"
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

CJUK

Sorry, no it doesn't always say 767 but the rest is the same.

"Duplicate entry '***' for key 1"

JayBachatero

I don't have the convert files with me but open your ipb2_to_smf.sql file.  There should be a line that says "---* {$to_prefix}topics"  After that add

---{
$ignore = true;
---}

Let me know if that works.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

CJUK

Seems to be working so far, Looks like it will take a while to convert my large forums though.

thanks for the help Jay




JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

CJUK

All seems to have gone well until it reaches poll_logs
I get this error this error:

Duplicate entry '390-1639-0' for key 1

I managed to bypass the poll logs and move on to the next steps.  It then got as far as the attachments and displayed this error, one for each attachment by the looks of it.

Warning: copy(/home/cjuk/forums/uploads/post-11-1077339281.jpg) [function.copy]: failed to open stream: No such file or directory in /home/.molotov/cjuk/smf/convert.php(1657) : eval()'d code on line 21

I think this may be something to do with the server path rather than the convertor but your opinion would be helpful.

I couldn't bypass the attachments error to go any further.

discipleoftheway

Quote from: JayBachatero on March 26, 2007, 09:24:41 AM
You mean this[/ur] one?
Yes! And I am getting the duplicate entry error when it's processing poll_logs too. It's a shame, too, to get so close and have it die. Frankly, if nothing else, I'd be willing to not import the polls if I could just snag everything else.

JayBachatero

The poll dup key error should be easy to make  it ignore duplicate keys.  Just need to add
Quote from: JayBachatero on March 26, 2007, 10:00:17 AM

---{
$ignore = true;
---}

After the ---* {to_prefix}polls.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

CJUK

Excellent. Thanks for you help.  That seems to have worked.

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Crawler

I'm having the same problems, ly I'm converting from Invision Board 1.3.1 to SMF 1.1.2 with the converter currently offered on the mainpage for this procedure. I get the error 'Duplicate entry '2071' for key 1' and when I deleted topic 2071 and started the converter again I got the same error-message only with topic 2072 ... the line you mentioned above is not in the converter-script I use, so what can I do?

Crawler

Ok, I loaded the newest version of the script and sql-file and added the entry you mentioned above, but I still get the duplicate entry-message.

JayBachatero

You need to use the correct converter.  This converter is for IPB 2.0.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: