Fixed Mysqli prepare error: Unknown column 'team.last_updated'

Younes

New Member
Hello :D
I've just upgraded 2.4.7 to 2.5.0build2
Also there is no outdated template (reverted)

PHP:
Error Info
ErrorException: Undefined index: last_updated - library/Nobita/Teams/Model/Team.php:619
Generated By: Light, 7 minutes ago
Stack Trace
#0 /home/user/domains/domain.com/public_html/library/Nobita/Teams/Model/Team.php(619): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/user/...', 619, Array)
#1 /home/user/domains/domain.com/public_html/library/Nobita/Teams/Model/Team.php(646): Nobita_Teams_Model_Team->prepareTeam(Array, Array, NULL)
#2 /home/user/domains/domain.com/public_html/library/Nobita/Teams/Helper/Widget.php(207): Nobita_Teams_Model_Team->prepareTeams(Array)
#3 /home/user/domains/domain.com/public_html/library/Nobita/Teams/Helper/Widget.php(46): Nobita_Teams_Helper_Widget::filterUnviewableAndPrepareTeams(Array)
#4 /home/user/domains/domain.com/public_html/library/Nobita/Teams/ControllerPublic/Team.php(65): Nobita_Teams_Helper_Widget::getFeaturedGroupsWidget(Array)
#5 /home/user/domains/domain.com/public_html/library/XenForo/FrontController.php(351): Nobita_Teams_ControllerPublic_Team->actionIndex()
#6 /home/user/domains/domain.com/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/user/domains/domain.com/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}

Request State

array(3) {
  ["url"] => string(37) "https://www.domain.com/groups/"
  ["_GET"] => array(1) {
    ["/groups/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Hi @Nobita ,

After I upgraded to build 2, all my site get this:
Code:
XenForo
Server Error

Mysqli prepare error: Unknown column 'team.last_updated' in 'field list'

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 Nobita/Teams/Model/Member.php at line 37
Nobita_Teams_Model_Member->getRecordByKeys() in Nobita/Teams/Model/Abstract.php at line 23
Nobita_Teams_Model_Abstract->getTeamMemberRecord() in Nobita/Teams/XenForo/Model/Thread.php at line 281
Nobita_Teams_XenForo_Model_Thread->canDeleteThread() in XenForo/Model/Thread.php at line 1721
XenForo_Model_Thread->addInlineModOptionToThread() in XenForo/Model/Thread.php at line 1803
XenForo_Model_Thread->prepareThread() in Nobita/Teams/XenForo/Model/Thread.php at line 123
Nobita_Teams_XenForo_Model_Thread->prepareThread() in XenForo/ControllerPublic/Forum.php at line 113
XenForo_ControllerPublic_Forum->actionIndex() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in D:/dev/wamp/www/xenforo/index.php at line 13

and the log:
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'team.last_updated' in 'field list' - library\Zend\Db\Statement\Mysqli.php:77
Generated By: dadparvar, 2 minutes ago
Stack Trace
#0 D:\dev\wamp\www\xenforo\library\Zend\Db\Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\t\t\tSELECT tea...')
#1 D:\dev\wamp\www\xenforo\library\Zend\Db\Adapter\Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\t\t\tSELECT tea...')
#2 D:\dev\wamp\www\xenforo\library\Zend\Db\Adapter\Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\t\t\tSELECT tea...')
#3 D:\dev\wamp\www\xenforo\library\Zend\Db\Adapter\Abstract.php(753): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tSELECT tea...', Array)
#4 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Model\Member.php(37): Zend_Db_Adapter_Abstract->fetchRow('\r\n\t\t\tSELECT tea...', Array)
#5 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Model\Abstract.php(23): Nobita_Teams_Model_Member->getRecordByKeys(1, 1, Array)
#6 D:\dev\wamp\www\xenforo\library\Nobita\Teams\XenForo\Model\Thread.php(281): Nobita_Teams_Model_Abstract->getTeamMemberRecord(1, Array)
#7 D:\dev\wamp\www\xenforo\library\XenForo\Model\Thread.php(1721): Nobita_Teams_XenForo_Model_Thread->canDeleteThread(Array, Array, 'soft', NULL, Array, Array)
#8 D:\dev\wamp\www\xenforo\library\XenForo\Model\Thread.php(1803): XenForo_Model_Thread->addInlineModOptionToThread(Array, Array, Array, Array)
#9 D:\dev\wamp\www\xenforo\library\Nobita\Teams\XenForo\Model\Thread.php(123): XenForo_Model_Thread->prepareThread(Array, Array, Array, NULL)
#10 D:\dev\wamp\www\xenforo\library\XenForo\ControllerPublic\Forum.php(113): Nobita_Teams_XenForo_Model_Thread->prepareThread(Array, Array, Array)
#11 D:\dev\wamp\www\xenforo\library\XenForo\FrontController.php(351): XenForo_ControllerPublic_Forum->actionIndex()
#12 D:\dev\wamp\www\xenforo\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#13 D:\dev\wamp\www\xenforo\index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array (size=3)
  'url' => string 'http://localhost/xenforo/index.php' (length=34)
  '_GET' =>
    array (size=0)
      empty
  '_POST' =>
    array (size=0)
      empty

Regards
 
Last edited:
Main page of my board gives the error above.

But the group's index gives this:
Code:
Server Error

Undefined index: last_updated

XenForo_Application::handlePhpError() in Nobita/Teams/Model/Team.php at line 619
Nobita_Teams_Model_Team->prepareTeam() in Nobita/Teams/Model/Team.php at line 646
Nobita_Teams_Model_Team->prepareTeams() in Nobita/Teams/Helper/Widget.php at line 207
Nobita_Teams_Helper_Widget::filterUnviewableAndPrepareTeams() in Nobita/Teams/Helper/Widget.php at line 46
Nobita_Teams_Helper_Widget::getFeaturedGroupsWidget() in Nobita/Teams/ControllerPublic/Team.php at line 65
Nobita_Teams_ControllerPublic_Team->actionIndex() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in D:/dev/wamp/www/xenforo/index.php at line 13
and the log:
Code:
Error Info
ErrorException: Undefined index: last_updated - library\Nobita\Teams\Model\Team.php:619
Generated By: dadparvar, 1 minute ago
Stack Trace
#0 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Model\Team.php(619): XenForo_Application::handlePhpError(8, 'Undefined index...', 'D:\\dev\\wamp\\www...', 619, Array)
#1 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Model\Team.php(646): Nobita_Teams_Model_Team->prepareTeam(Array, Array, NULL)
#2 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Helper\Widget.php(207): Nobita_Teams_Model_Team->prepareTeams(Array)
#3 D:\dev\wamp\www\xenforo\library\Nobita\Teams\Helper\Widget.php(46): Nobita_Teams_Helper_Widget::filterUnviewableAndPrepareTeams(Array)
#4 D:\dev\wamp\www\xenforo\library\Nobita\Teams\ControllerPublic\Team.php(65): Nobita_Teams_Helper_Widget::getFeaturedGroupsWidget(Array)
#5 D:\dev\wamp\www\xenforo\library\XenForo\FrontController.php(351): Nobita_Teams_ControllerPublic_Team->actionIndex()
#6 D:\dev\wamp\www\xenforo\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 D:\dev\wamp\www\xenforo\index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array (size=3)
  'url' => string 'http://localhost/xenforo/index.php?groups/' (length=42)
  '_GET' =>
    array (size=1)
      'groups/' => string '' (length=0)
  '_POST' =>
    array (size=0)
      empty
 
Look like the upgrade failed.

Please try to run manual there queries:

Code:
ALTER TABLE xf_team CHANGE last_activity last_updated int usigned not null default '0'
ALTER TABLE xf_team ADD INDEX last_updated (last_updated)
ALTER TABLE xf_team_category DROP COLUMN associate_node_ids,
                    DROP COLUMN allow_change_forums
ALTER TABLE xf_team_profile DROP COLUMN node_ids,
                    DROP COLUMN last_update_forums_date
ALTER TABLE xf_team_event ADD INDEX begin_date (begin_date),
                ADD INDEX end_date (end_date)
 
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usigned not null default '0' ALTER TABLE xf_team ADD INDEX last_updated (last_u' at line 1
 
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usigned not null default '0' ALTER TABLE xf_team ADD INDEX last_updated (last_u' at line 1
alfa1LOL. Now I know why it failed :)

Many thanks :)
Please upload this file to library/Nobita/Teams/Install folder
 

Attachments

Back
Top