• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 IP.Board import results in Duplicate entry error

denam

Active member
#1
When doing a test IP.board import on a fresh xenforo database (except admin user is during the xenforo install created) I get a server error when importing the user groups.

Of course I clicked the option to retain the ids because my xenforo installation has no existing data besides the admin user. Retaining the ids are important to me for url rewritings.

Is there a way to import the IP.Board data in a new xenforo installation while having the id's retained?

Server Error

Mysqli statement execute error : Duplicate entry '3' for key 'PRIMARY'

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1624
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
XenForo_DataWriter->save() in XenForo/Model/Import.php at line 599
XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 637
XenForo_Model_Import->importUserGroup() in XenForo/Importer/IPBoard.php at line 352
XenForo_Importer_IPBoard->stepUserGroups() in XenForo/Importer/Abstract.php at line 97
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 187
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 239
XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 182
XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /Users/joe/Sites/joelle/xen/admin.php at line 13
 

Brogan

XenForo moderator
Staff member
#2
How many user groups do you have in your IPB installation?

Can you list them and associated IDs?
 

denam

Active member
#3
We have 9 user groups which are:

guests/ unregistered = 1
members = 2
inactive = 3
email confirmation missing = 4
super moderators = 5
admin = 6
moderators = 7
banned users = 8
advertisement = 9
I have just noticed that when not choosing to retain the ids before importing there is the option of the 'archive import log' which can be used to ensure a proper URL rewriting. If that works well, this could also be an option.
 

Mike

XenForo developer
Staff member
#4
There's a tricky situation with maintaining IDs when you have a group setup that involves one of your "non standard" groups (one that we have to create when importing) conflicting with a standard XF group. Unfortunately, there isn't really a great workaround short of not maintaining IDs.

The import log does allow mapping of URLs even if IDs aren't maintained. There are redirect scripts/guides in the resources section for IPB that use the import log to deal with ID changes.
 

Nuno

Active member
#6
There's a tricky situation with maintaining IDs when you have a group setup that involves one of your "non standard" groups (one that we have to create when importing) conflicting with a standard XF group. Unfortunately, there isn't really a great workaround short of not maintaining IDs.

The import log does allow mapping of URLs even if IDs aren't maintained. There are redirect scripts/guides in the resources section for IPB that use the import log to deal with ID changes.
I have the same error.

If I place all users in these groups before importing will it works?

Validating User Group ID:
Guest User Group ID:
Member User Group ID:
Admin User Group ID:
Banned User Group ID

Changing id's is not an option :(
 
Last edited:

Mike

XenForo developer
Staff member
#7
If you want to maintain IDs, groups with IDs 1-4 in your source data must map to XF's built-in groups (guest, registered, moderating, administrative). Otherwise, you'll need to not maintain IDs within XF (or change IDs in the source, but that's never really going to be viable).