Fixed  Importer Issue - IPB

Marc

Well-known member
Just got the following whilst importing PMs - Any advice peeps?

Mysqli statement execute error : Column 'last_message_user_id' cannot be null
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
  4. Zend_Db_Adapter_Abstract->update() in XenForo/Model/Import.php at line 850
  5. XenForo_Model_Import->importConversation() in XenForo/Importer/IPBoard.php at line 1486
  6. XenForo_Importer_IPBoard->stepPrivateMessages() in XenForo/Importer/Abstract.php at line 77
  7. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 166
  8. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 218
  9. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 161
  10. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
  11. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  12. XenForo_FrontController->run() in /home/huskyown/public_html/xentest/admin.php at line 13
 
It seems to be suggesting that the user id in the table is null or blank.

I'll move this to bugs so Kier can decide what to do in this case, if anything needs doing.
 
Gathered that .. Just tryin to figure which table the null is in. To be honest was more bothered about the fact there is one that is null in my IPB tables LOL
 
You should be able to track the offending PM down by checking where the import stopped and then cross-referencing with the PM table(s) in the IPB database.
It should be the next one.

I'm not familiar with the IPB DB structure though so can't help much more.
 
You should be able to track the offending PM down by checking where the import stopped and then cross-referencing with the PM table(s) in the IPB database.
It should be the next one.

I'm not familiar with the IPB DB structure though so can't help much more.

Cheers anyways Paul. Seems to have stopped right at the beginning of the message import. Which would indicate its some of the sh...rubbish left over from VBulletin. Cant seem to see the null record, but to be honest Im not entirely sure which field either. Guess thats my fun over for tonight LOL
 
Cheers anyways Paul. Seems to have stopped right at the beginning of the message import. Which would indicate its some of the sh...rubbish left over from VBulletin. Cant seem to see the null record, but to be honest Im not entirely sure which field either. Guess thats my fun over for tonight LOL
If you could open a support ticket so I can take a look at your DB, we should be able to get this sorted.
 
The problem here was one of the user record for one of the messages not appearing in the DB.

The fix involved providing a default user ID in those cases.

library/XenForo/Importer/IPBoard.php line 1488:
PHP:
'user_id' => $this->_mapLookUp($mapUserIds, $post['msg_author_id']),
becomes
PHP:
'user_id' => $this->_mapLookUp($mapUserIds, $post['msg_author_id'], 0),
 
Top Bottom