Fixed Error importing polls (from IPS4)

Nathanial B.

New member
Hello!
I've been spending the past several hours doing a test migration from IPS 4. The last step I'm on is importing polls. I get the following errors when attempting to import polls:

Code:
Server Error

Mysqli prepare error: Unknown column 'polls.tid' in 'on clause'

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Importer/IPBoard40x.php at line 1556
XenForo_Importer_IPBoard40x->_getPolls() in XenForo/Importer/IPBoard.php at line 2937
XenForo_Importer_IPBoard->stepPolls() in XenForo/Importer/IPBoard40x.php at line 1539
XenForo_Importer_IPBoard40x->stepPolls() in XenForo/Importer/Abstract.php at line 97
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 241
XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 184
XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/[redacted]/public_html/xenforo/admin.php at line 13

Any suggestions would be appreciated :)
Thank you!
 
In all of the IPS test data I have, I can't see why you would be getting this problem.

What's the exact IPS version you're importing from?

If you run the following query on the IPS database, what is the output?
Code:
SHOW CREATE TABLE core_polls
You may need to prepend your database prefix to the table name if you have one.
 
Hi Chris, thanks for the fast response.

What's the exact IPS version you're importing from?

The version we're running is the latest version, 4.1.7.

If you run the following query on the IPS database, what is the output?
Code:
SHOW CREATE TABLE core_polls

If I did this correctly, this is the output:

Code:
CREATE TABLE `core_polls` (
 `pid` mediumint(8) NOT NULL AUTO_INCREMENT,
 `start_date` int(10) DEFAULT NULL,
 `choices` text COLLATE utf8mb4_unicode_ci,
 `starter_id` mediumint(8) NOT NULL DEFAULT '0',
 `votes` mediumint(9) NOT NULL DEFAULT '0',
 `poll_question` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `poll_only` tinyint(1) NOT NULL DEFAULT '0',
 `poll_view_voters` int(1) NOT NULL DEFAULT '0',
 PRIMARY KEY (`pid`)
) ENGINE=MyISAM AUTO_INCREMENT=455 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

You may need to prepend your database prefix to the table name if you have one.

I never used a database prefix from what I recall.

Please let me know if there's any further information I can provide you with.
 
I'm still looking into this.

The output of that query suggests they may have changed the database schema in a recent version, but we've had successful imports from versions not much older than yours so it is somewhat confusing.

I suppose an important question is: If you go onto your IPS 4.1 board now, can you view, edit and create polls correctly?

Also aside from the core_polls and core_voters tables, do you see any other tables which may be related to polls?
 
Last edited:
I suppose an important question is: If you go onto your IPS 4.1 board now, can you view, edit and create polls correctly?

Yes, I can do all of that just fine on our IPS 4.1 install.

Also aside from the core_polls and core_voters tables, do you see any other tables which may be related to polls?

I looked through, and I'm not finding anything that looks like it can be related. Would it help if I gave you access to the database privately?

I also created a fresh install locally of IPS 4.1 (same latest version as our live install), created a couple of forums and made a poll, and then did a local install of Xenforo and tried the import. It again fails on importing polls with the same error messages as indicated in my first post.
However, when running the SQL query you told me locally, this is what is kicked back:

Code:
CREATE TABLE `core_polls` (
`pid` mediumint(8) N...

Not sure if that helps at all, but I think it's true that something changed in the latest version of IPS 4?
 
Last edited:
I think I can see the change they've made now.

Thanks for your help up to now.

This is something we need to make changes for. I'll see what's involved and I'll let you know as soon as I have a solution.
 
If polls is the last step, which I think it is, then you could in theory go live without them (just don't actually click the "Complete" button on the import screen) and finish importing them once this is resolved. Just an option in case you're in a rush to go live :)
 
We're not in a rush to go live yet, so no worries if it takes time. If you need me to test any changes done, please let me know :)

Thanks for all of your help!
 
Back
Top Bottom