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

Fixed Thread Prefixes import failed for threads

high1976

Active member
#1
maybe I missed it elsewhere but I tried a fresh testimport for 1.1 from vb3.8x and Thread Prefixes are imported properly to backend but none thread kept the existing prefix after the import.

So the importer just did the prefixes itself but not the so marked threads (prefix_id = 0)...Bug or by design?
 

Kier

XenForo Developer
Staff member
#5
Deebs and high1976, can you confirm that you imported thread prefix definitions before importing threads and posts?
 

Kier

XenForo Developer
Staff member
#6
I've tried various different ways to attack this, and I can't reproduce it. You're not using the CLI importer or something are you?
 

high1976

Active member
#8
just usual import via acp-backend. I'm not sure what was imported first but I guess it was first prefix and then threads (as thats the order given).
Trying atm the other way, first threads than prefix (will take some hours)
 
#11
Prefixes must be imported before threads. I've changed the script for B3 so that order is enforced.
thanks Kier, did it again that way and it worked for several subforums. Strangely not for all, at least one is still missing its TP. If I try to set a new prefix in this one I get:

PHP:
Server Error Log
Error Info
ErrorException: Undefined index: post_id - library/XenForo/Search/DataHandler/Post.php:33
Generated By: admin, A moment ago
Stack Trace
#0 /var/www/xenforo/library/XenForo/Search/DataHandler/Post.php(33): XenForo_Application::handlePhpError(Object(XenForo_Search_Indexer), Array, Array)
#1 /var/www/xenforo/library/XenForo/Search/DataHandler/Abstract.php(227): XenForo_Search_DataHandler_Post->_insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#2 /var/www/xenforo/library/XenForo/DataWriter/Discussion.php(612): XenForo_Search_DataHandler_Abstract->insertIntoIndex(Array)
#3 /var/www/xenforo/library/XenForo/DataWriter/Discussion.php(539): XenForo_DataWriter_Discussion->_updateSearchIndexTitle(Array)
#4 /var/www/xenforo/library/XenForo/DataWriter/Discussion.php(380): XenForo_DataWriter_Discussion->_indexForSearch()
#5 /var/www/xenforo/library/XenForo/DataWriter.php(1366): XenForo_DataWriter_Discussion->_postSave()
#6 /var/www/xenforo/library/XenForo/Model/InlineMod/Thread.php(84): XenForo_DataWriter->save(Array, 16, NULL, Array, NULL)
#7 /var/www/xenforo/library/XenForo/ControllerPublic/InlineMod/Thread.php(340): XenForo_Model_InlineMod_Thread->applyThreadPrefix()
#8 /var/www/xenforo/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_InlineMod_Thread->actionPrefix(Object(XenForo_RouteMatch))
#9 /var/www/xenforo/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch()
#10 /var/www/xenforo/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(65) "http://domain.com/xenforo/inline-mod/thread/prefix"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["prefix_id"] => string(2) "16"
    ["save"] => string(19) "Apply Thread Prefix"
    ["threads"] => array(1) {
      [0] => string(5) "97396"
    }
    ["nodeIds"] => array(1) {
      [0] => string(1) "7"
    }
    ["_xfConfirm"] => string(1) "1"
    ["redirect"] => string(78) "http://domain.com/xenforo/forums/website-forum-wiki-feedback.7/"
    ["_xfToken"] => string(53) "1,1318429417,7802ddf123e5b4b2850c909e035631ab1aa09f78"
  }
}
this error doesn't come up with first import. There I was able to set the prefix (same subforum)

in another subforum with imported TP I get this when I try to set a new TP:
PHP:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Operand should contain 1 column(s) - library/Zend/Db/Statement/Mysqli.php:77
Generated By: admin, A moment ago
Stack Trace
#0 /var/www/xenforo/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????SELECT pref...')
#1 /var/www/xenforo/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????SELECT pref...')
#2 /var/www/xenforo/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????SELECT pref...')
#3 /var/www/xenforo/library/Zend/Db/Adapter/Abstract.php(734): Zend_Db_Adapter_Abstract->query('????SELECT pref...', Array)
#4 /var/www/xenforo/library/XenForo/Model/ThreadPrefix.php(60): Zend_Db_Adapter_Abstract->fetchAll('????SELECT pref...')
#5 /var/www/xenforo/library/XenForo/Model/ThreadPrefix.php(218): XenForo_Model_ThreadPrefix->getPrefixes(Array)
#6 /var/www/xenforo/library/XenForo/Model/ThreadPrefix.php(238): XenForo_Model_ThreadPrefix->getPrefixesInForum(Array)
#7 /var/www/xenforo/library/XenForo/ControllerPublic/InlineMod/Thread.php(374): XenForo_Model_ThreadPrefix->getUsablePrefixesInForums(Array)
#8 /var/www/xenforo/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_InlineMod_Thread->actionPrefix()
#9 /var/www/xenforo/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /var/www/xenforo/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(65) "http://domain.com/xenforo/inline-mod/thread/switch"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["threads"] => array(1) {
      [0] => string(5) "82153"
    }
    ["_xfToken"] => string(53) "1,1318430199,ded407c19f204903f514b7885cc7b4737f137d2b"
    ["a"] => string(6) "prefix"
    ["_xfRequestUri"] => string(30) "/xenforo/forums/marktplatz.72/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}