daveb
Active member
Got the following in server logs
Stack trace
SELECT
SUM(IF(user_id >= 0 AND robot_key = '', 1, 0)) AS total,
SUM(IF(user_id > 0, 1, 0)) AS members,
SUM(IF(user_id = 0 AND robot_key = '', 1, 0)) AS members
// SUM(IF(user_id = 0 AND robot_key = '', 1, 0)) AS guests
FROM xf_session_activity
WHERE view_date >= ?
------------
#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src/XF/Db/Mysqli/Statement.php(40): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(145): XF\Db\AbstractAdapter->query('
SELECT
...', 1570829120)
#5 src/XF/Repository/SessionActivity.php(26): XF\Db\AbstractAdapter->fetchRow('
SELECT
...', 1570829120)
#6 src/XF/Repository/SessionActivity.php(63): XF\Repository\SessionActivity->getOnlineCounts()
#7 src/XF/Widget/MembersOnline.php(25): XF\Repository\SessionActivity->getOnlineStatsBlockData(true, 50, false)
#8 internal_data/code_cache/widgets/_6_forum_overview_members_online.php(5): XF\Widget\MembersOnline->render()
#9 src/XF/Template/Templater.php(6670): XF\SubContainer\Widget->{closure}(Object(ThemeHouse\ReactPlus\XF\Template\Templater), Array, Array)
#10 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#11 src/XF/Template/Templater.php(1634): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#12 internal_data/code_cache/templates/l1/s2/public/forum_list.php(325): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#13 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(ThemeHouse\ReactPlus\XF\Template\Templater), Array)
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('public:forum_li...', Array)
#15 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#17 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#21 src/XF.php(390): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
- XF\Db\InvalidQueryException: Error rendering widget: MySQL statement prepare error [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 '// SUM(IF(user_id = 0 AND robot_key = '', 1, 0)) AS guests FROM xf_session' at line 5
- src/XF/Db/AbstractStatement.php:217
- Generated by: Unknown account
- Nov 4, 2019 at 9:25 PM
Stack trace
SELECT
SUM(IF(user_id >= 0 AND robot_key = '', 1, 0)) AS total,
SUM(IF(user_id > 0, 1, 0)) AS members,
SUM(IF(user_id = 0 AND robot_key = '', 1, 0)) AS members
// SUM(IF(user_id = 0 AND robot_key = '', 1, 0)) AS guests
FROM xf_session_activity
WHERE view_date >= ?
------------
#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src/XF/Db/Mysqli/Statement.php(40): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(145): XF\Db\AbstractAdapter->query('
SELECT
...', 1570829120)
#5 src/XF/Repository/SessionActivity.php(26): XF\Db\AbstractAdapter->fetchRow('
SELECT
...', 1570829120)
#6 src/XF/Repository/SessionActivity.php(63): XF\Repository\SessionActivity->getOnlineCounts()
#7 src/XF/Widget/MembersOnline.php(25): XF\Repository\SessionActivity->getOnlineStatsBlockData(true, 50, false)
#8 internal_data/code_cache/widgets/_6_forum_overview_members_online.php(5): XF\Widget\MembersOnline->render()
#9 src/XF/Template/Templater.php(6670): XF\SubContainer\Widget->{closure}(Object(ThemeHouse\ReactPlus\XF\Template\Templater), Array, Array)
#10 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#11 src/XF/Template/Templater.php(1634): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#12 internal_data/code_cache/templates/l1/s2/public/forum_list.php(325): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#13 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(ThemeHouse\ReactPlus\XF\Template\Templater), Array)
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('public:forum_li...', Array)
#15 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#17 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#21 src/XF.php(390): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}