XF 2.0 Admin panel server errors

bosss

Member
This have in my admin panel!

I know that maybe database is damaged - but i never used some addons what i gott error's messages!

regards

bosss

will just try repare site before maybe must start from begining!
 

Attachments

  • admin_error_log.webp
    admin_error_log.webp
    40 KB · Views: 21
more details - maybe help other people

Code:
    ErrorException: Template error: array_keys() expects parameter 1 to be array, null given src/addons/XFMG/Entity/Album.php:469

    Generated by: Bosss Sep 23, 2017 at 16:58

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(2, 'array_keys() ex...', '/home/newlibar/...', 469, Array)
#1 /home/newlibar/public_html/xf/src/addons/XFMG/Entity/Album.php(469): array_keys(NULL)
#2 /home/newlibar/public_html/xf/src/XF/Mvc/Entity/Entity.php(139): XFMG\Entity\Album->getFieldCache()
#3 /home/newlibar/public_html/xf/src/XF/Mvc/Entity/Entity.php(97): XF\Mvc\Entity\Entity->get('field_cache')
#4 /home/newlibar/public_html/xf/internal_data/code_cache/templates/l1/s1/public/xfmg_media_view.php(1055): XF\Mvc\Entity\Entity->offsetGet('field_cache')
#5 /home/newlibar/public_html/xf/src/XF/Template/Templater.php(1133): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#6 /home/newlibar/public_html/xf/src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('public:xfmg_med...', Array)
#7 /home/newlibar/public_html/xf/src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#8 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XFMG:Media\\View', 'public:xfmg_med...', Array)
#9 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 /home/newlibar/public_html/xf/src/XF/App.php(1787): XF\Mvc\Dispatcher->run()
#12 /home/newlibar/public_html/xf/src/XF.php(326): XF\App->run()
#13 /home/newlibar/public_html/xf/index.php(13): XF::runApp('XF\\Pub\\App')
#14 {main}

Request state

array(4) {
  ["url"] => string(80) "/xf/index.php?media/rolling-stones-paint-it-black-2006-live-video-hd-youtube.28/"
  ["referrer"] => string(43) "http://www.newlibar.com/xf/index.php?media/"
  ["_GET"] => array(1) {
    ["media/rolling-stones-paint-it-black-2006-live-video-hd-youtube_28/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
More info

Code:
Server error log

    XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'custom_fields' in 'field list' src/XF/Db/AbstractStatement.php:183

    Generated by: Bosss Sep 23, 2017 at 17:02

Stack trace

#0 /home/newlibar/public_html/xf/src/XF/Db/Mysqli/Statement.php(34): XF\Db\AbstractStatement->getException('MySQL statement...', 1054)
#1 /home/newlibar/public_html/xf/src/XF/Db/Mysqli/Statement.php(44): XF\Db\Mysqli\Statement->prepare()
#2 /home/newlibar/public_html/xf/src/XF/Db/AbstractAdapter.php(67): XF\Db\Mysqli\Statement->execute()
#3 /home/newlibar/public_html/xf/src/XF/Db/AbstractAdapter.php(144): XF\Db\AbstractAdapter->query('INSERT  INTO xf...', Array)
#4 /home/newlibar/public_html/xf/src/XF/Mvc/Entity/Entity.php(1714): XF\Db\AbstractAdapter->insert('xf_thread', Array)
#5 /home/newlibar/public_html/xf/src/XF/Mvc/Entity/Entity.php(1458): XF\Mvc\Entity\Entity->_saveToSource()
#6 /home/newlibar/public_html/xf/src/XF/Service/Thread/Creator.php(279): XF\Mvc\Entity\Entity->save(true, false)
#7 /home/newlibar/public_html/xf/src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Thread\Creator->_save()
#8 /home/newlibar/public_html/xf/src/XF/Pub/Controller/Forum.php(704): XF\Service\Thread\Creator->save()
#9 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#10 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'post-thread', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(XF\Pub\Controller\Forum), NULL)
#11 /home/newlibar/public_html/xf/src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 /home/newlibar/public_html/xf/src/XF/App.php(1787): XF\Mvc\Dispatcher->run()
#13 /home/newlibar/public_html/xf/src/XF.php(326): XF\App->run()
#14 /home/newlibar/public_html/xf/index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}

Request state

array(4) {
  ["url"] => string(62) "/xf/index.php?forums/libar-diskusije-suggestions.8/post-thread"
  ["referrer"] => string(85) "http://www.newlibar.com/xf/index.php?forums/libar-diskusije-suggestions.8/post-thread"
  ["_GET"] => array(1) {
    ["forums/libar-diskusije-suggestions_8/post-thread"] => string(0) ""
  }
  ["_POST"] => array(11) {
    ["title"] => string(10) "Xenforo 2 "
    ["message_html"] => string(255) "<p>Site je nadogradjeno na verziju 2.&nbsp;</p><p><br></p><p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite12 fr-selected" alt="o_O" title="Er... what?    o_O"><br></p>"
    ["attachment_hash"] => string(32) "d9ee3bc207f2498de8092f7fc046918b"
    ["attachment_hash_combined"] => string(81) "{"type":"post","context":{"node_id":8},"hash":"d9ee3bc207f2498de8092f7fc046918b"}"
    ["tags"] => string(0) ""
    ["_xfSet"] => array(3) {
      ["watch_thread"] => string(1) "1"
      ["discussion_open"] => string(1) "1"
      ["sticky"] => string(1) "1"
    }
    ["discussion_open"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(62) "/xf/index.php?forums/libar-diskusije-suggestions.8/post-thread"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
These are all related to the issues from your previous upgrade-related thread. Your database is in a totally inconsistent state. It's missing many things that are changed in the 2.0 upgrade.

Unfortunately, the recommendation from that thread applies: we would need you to restore to a 1.x backup and re-attempt the upgrade.
 
Asked and they have no backup!

Can i fix or copy missing columns in database?

Code:
Uh oh, your upgrade to 2.0.0 Beta 3 has failed! The following elements of the database are incorrect:

    Column xf_conversation_message.like_users missing.
    Column xf_forum.field_cache missing.
    Column xf_thread.custom_fields missing.
 
I think those XFMG errors might be genuine bugs.

Against my better judgement, here are the queries you need which should get everything back up and running.

SQL:
ALTER TABLE xf_conversation_message
ADD like_users BLOB

SQL:
ALTER TABLE xf_forum
ADD field_cache MEDIUMBLOB

SQL:
ALTER TABLE xf_thread
ADD custom_fields MEDIUMBLOB

Run these queries, but please note if there's anything output, especially any error messages and report back.

Please, in future, don't be in a rush to upgrade so much that you forget to take backups. XF2 Beta is currently unsupported and there are plenty of warnings against using it. We should have just asked you to start again from scratch!

Good luck.
 
Back
Top Bottom