MG 1.1 MG 1.1.10 - Mysqli prepare error: Key 'comment_date' doesn't exist in table 'comment'

51463

Well-known member
The new version of media gallery is not working for me, I keep getting this error after upgrading. I even disabled all of my add-ons and same problem. This happens when i click on the media tab on the forum.



An unexpected database error occurred. Please try again later.
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Key 'comment_date' doesn't exist in table 'comment' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: joey, A moment ago
Stack Trace
#0 /home/carfoumz/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT comm...')
#1 /home/carfoumz/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tSELECT comm...')
#2 /home/carfoumz/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT comm...')
#3 /home/carfoumz/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT comm...', Array, 2)
#4 /home/carfoumz/public_html/library/XenGallery/Model/Comment.php(195): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT comm...', 'comment_id')
#5 /home/carfoumz/public_html/library/XenGallery/Callback.php(119): XenGallery_Model_Comment->getCommentsForBlockOrFeed('5', Array)
#6 [internal function]: XenGallery_Callback::getCommentsForBlock('', Array, Object(XenForo_Template_Public))
#7 /home/carfoumz/public_html/library/XenForo/Template/Abstract.php(330): call_user_func(Array, '', Array, Object(XenForo_Template_Public))
#8 /home/carfoumz/public_html/internal_data/templates/S.42,L.1,xengallery_category_wrapper.php(169): XenForo_Template_Abstract->callTemplateCallback('XenGallery_Call...', 'getCommentsForB...', '', Array)
#9 /home/carfoumz/public_html/library/XenForo/Template/Abstract.php(260): include('/home/carfoumz...')
#10 /home/carfoumz/public_html/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('/home/carfoumz...', Array)
#11 /home/carfoumz/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#12 /home/carfoumz/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(124): XenForo_Template_Public->render()
#13 /home/carfoumz/public_html/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#14 /home/carfoumz/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#15 /home/carfoumz/public_html/index.php(13): XenForo_FrontController->run()
#16 {main}
Request State
array(3) {
["url"] => string(27) "http://carfoumz.com/media/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
We did make a change surrounding this in XFMG 1.1.10, but it's not an issue I can reproduce, nor one we've had any reports of.

Although, this could actually date back to a change we made in XFMG 1.0.4 which introduced the comment_date index on the xengallery_comment table. There is nothing that should have prevented the change from happening, but that appears as though it could be the case.

You may want to try seeing if running this query fixes the issue:
Code:
ALTER TABLE xengallery_comment ADD INDEX comment_date (comment_date), ADD INDEX content_type_content_id_comment_date (content_type, content_id, comment_date)
 
Top Bottom