XF 1.5 Install/Upgrade Error

triforceguy1

Active member
Hello,

I'm currently in the process of transferring our forum from one server to another as we are merging two sites together. I was able to transfer the database, upload the files, and now I have to give credentials to upgrade the forum (I only just extended the licence after three years so it's a new version)

I enter the details and then I am presented with this error:

Code:
Server Error
Mysqli prepare error: Table 'nintybuz_forum.xf_user_option' doesn't exist

[LIST=1]
[*]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 753
[*]Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/User.php at line 446
[*]XenForo_Model_User->getUserById() in XenForo/Model/User.php at line 959
[*]XenForo_Model_User->getVisitingUserById() in XenForo/Visitor.php at line 415
[*]XenForo_Visitor::setup() in XenForo/Install/Controller/Upgrade.php at line 345
[*]XenForo_Install_Controller_Upgrade->actionLogin() in XenForo/FrontController.php at line 351
[*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
[*]XenForo_FrontController->run() in /home1/nintybuzz/public_html/forums/install/index.php at line 18
[/LIST]
Please could I get some help?
Leon
 
It looks like the database import wasn't complete to me. It's likely missing some tables that are towards the end (alphabetically).
 
Okay made some progress, found some of the tables which were in the sql files which didn't import properly, and I dumped the data into a temporary database successfully, but I am still missing some when I did a compare of the tables of the old server and from a fresh install.

Bear in mind the difference is the old on was from 1.2.2 and the new one is from 1.5.8
Could someone tell me which of these tables are absolutely necessary for the forum to work?
  • Xf_bbcode
  • Xf_email_bounce_log
  • Xf_email_bounce_soft
  • Xf_error_log
  • Xf_help_page
  • Xf_image_proxy
  • Xf_image_proxy_referrer
  • Xf_link_proxy
  • Xf_link_proxy_referrer
  • Xf_sitemap
  • Xf_smilie_category
  • Xf_spam_trigger_log
  • Xf_style_property_definition
  • Xf_tag
  • Xf_tag_content
  • Xf_tag_result_cache
  • Xf_tfa_attempt
  • Xf_tfa_provider
  • Xf_thread_reply_ban
  • Xf_user_change_log
  • Xf_user_change_temp
  • Xf_user_tfa
  • Xf_user_tfa_trusted
  • Xf_user_title_ladder
 
So, I'm trying a new method (the import external data too), which seems to be working, but I'm getting this error when trying to import threads and posts:

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

  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 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1638
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
  7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 617
  8. XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 1750
  9. XenForo_Model_Import->importPost() in XenForo/Importer/XenForo.php at line 1850
  10. XenForo_Importer_XenForo->stepThreads() in XenForo/Importer/Abstract.php at line 124
  11. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
  12. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 241
  13. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 184
  14. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 351
  15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  16. XenForo_FrontController->run() in /home1/nintybuzz/public_html/forums/admin.php at line 13
 
That error is typically due to there being previous data, either from an import or manually created and trying to retain IDs.

If you wish to retain IDs, you can only import into a new, blank XF installation.
 
That error is typically due to there being previous data, either from an import or manually created and trying to retain IDs.

If you wish to retain IDs, you can only import into a new, blank XF installation.
That's what I am doing, I made a fresh install, went to the Import tool, entered where to import from, and then I get that error once I try to import threads and posts, everything else before it worked perfectly
 
That would imply that there really is some data there which isn't there by default. I'd have to recommend doing a fresh install again (delete internal_data/install-lock.php and run the installer again).
 
That would imply that there really is some data there which isn't there by default. I'd have to recommend doing a fresh install again (delete internal_data/install-lock.php and run the installer again).
Okay, do you think the fact I left the data and internal data paths on the import options blank could've affected it too??

EDIT - Did a complete reinstall and Still getting the same error @Mike
 
Last edited:
Okay, I've now mostly successfully transferred the forum over to the new server and domain.

I uploaded the database to the new server and domain
Installed 1.2.2 on the server and pointed it to the database (going to upload all the files from the old server once everything works)

All works well at first, though I notice there are a few problems:

When I am logged in, loading sub-forums take a very long time, and they also add an extra /forums/ path to the url (e.g. http://www.nintybuzz.com/TestForum/forums/website-feedback-community.5/)

I also am unable to change any settings on the acp, when I do, I get the following error:

Server Error

Mysqli statement execute error : Field 'admin_log_id' doesn't have a default value

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/Model/Log.php at line 87
XenForo_Model_Log->logAdminRequest() in XenForo/ControllerAdmin/Abstract.php at line 32
XenForo_ControllerAdmin_Abstract->_logAdminRequest() in XenForo/ControllerAdmin/Abstract.php at line 25
XenForo_ControllerAdmin_Abstract->_postDispatchType() in XenForo/Controller.php at line 358
XenForo_Controller->postDispatch() in XenForo/FrontController.php at line 344
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home1/nintybuzz/public_html/TestForum/admin.php at line 13

EDIT - I fixed the admin error by making the admin_log_id primary and ticking the Auto Increment option for it. Still having the other issues however
 
Last edited:
EDIT - I fixed the admin error by making the admin_log_id primary and ticking the Auto Increment option for it. Still having the other issues however
The fact that it didn't have it is a massive red flag about the state and consistency of your data dump. (I suppose it could be the import process, but I'd put it at 99% the dump process.)

What tool are you using to do the database dump? It seems to be flawed (or have the wrong parameters specified). I'd really have to recommend using mysqldump and getting the old host/server admin involved if you can't run this yourself.
 
The fact that it didn't have it is a massive red flag about the state and consistency of your data dump. (I suppose it could be the import process, but I'd put it at 99% the dump process.)

What tool are you using to do the database dump? It seems to be flawed (or have the wrong parameters specified). I'd really have to recommend using mysqldump and getting the old host/server admin involved if you can't run this yourself.
Well Adam exported the tables from PHPMyAdmin (he had to do several because of timeouts), and I am using the HostGator Restore database tool to import the tables

I'll see if he can do it again using the method you've recommended :)
 
Last edited:
I'm really going to have to suggest another tool. Even if it appears to be a complete dump, the integrity of the dump is totally compromised if it's not creating the table structure correctly.
 
That is normal and expected. You can either change the name of the directory you've installed XenForo into or use route filters to change "forums/" to something else (it can't be removed as it identifies the type of content being requested).
 
That is normal and expected. You can either change the name of the directory you've installed XenForo into or use route filters to change "forums/" to something else (it can't be removed as it identifies the type of content being requested).
thank you very much, I just figured it out earlier actually haha

All that's left for me to do now is upgrade to the latest version... wish me luck :)
 
Top Bottom