- ErrorException: Template error: [E_USER_WARNING] Method canViewQuiz is not callable on the given object (XFMG\XF\Entity\User)
- src/XF/Template/Templater.php:1278
- Generated by: Unknown account
- Feb 11, 2025 at 5:53 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/chtas/pub...', 1278)
#1 src/XF/Template/Templater.php(1278): trigger_error('Method canViewQ...', 512)
#2 internal_data/code_cache/navigation_cache.php(866): XF\Template\Templater->method(Object(XFMG\XF\Entity\User), 'canViewQuiz', Array)
#3 src/XF/Template/Templater.php(8151): XF\Pub\App->{closure}(Object(MaZ\AMP\XF\Template\Templater), 'forums', Array)
#4 src/XF/Pub/App.php(634): XF\Template\Templater->renderNavigationClosure(Object(Closure), 'forums', Array)
#5 src/XF/Pub/App.php(585): XF\Pub\App->getNavigation(Array, 'forums')
#6 src/XF/App.php(2573): XF\Pub\App->renderPageHtml('
...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#7 src/XF/Mvc/Dispatcher.php(414): XF\App->renderPage('
...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#9 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#10 src/XF.php(806): XF\App->run()
#11 index.php(23): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
["url"] => string(54) "/threads/chaka-khan-released-ck-november-22-1988.5450/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Does it keep appearing again?As soon as I uploaded I got this error.
Does it keep appearing again?
It's ok when you rebuild addon data - XF extension classes are deactivated, while template modifications and other add-on content remain active and can cause errors.
Download again and reupload the new addon buildsHi @Painbaker,
View attachment 1691
After the last update, there is an error in the file health check result warning for the following add-ons.
New Features:
- Added option to require quiz completion confirmation (enabled by default)
- Added quiz featuring support
- Added embed resolver support
Fixes:
- Fixed incorrect display location of "reaction" button on quizzes
- Quiz completion log: Can not delete here. ("Du hast keine Rechte, diese Seite anzusehen oder diese Aktion auszuführen.")
Do you mean correct answer explain?Where do I enable the explanation? I don't find that, it does not show that?
Can you send the full stacktrace?- One time it crashed:
- XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ASC LIMIT 10' at line 5
- src\XF\Db\AbstractStatement.php:230
Stack-Trace
SELECT `xf_ozzmodz_quiz_question`.*
FROM `xf_ozzmodz_quiz_question`
WHERE (`xf_ozzmodz_quiz_question`.`quiz_id` = 2) AND (`xf_ozzmodz_quiz_question`.`question_state` = 'visible') AND (`xf_ozzmodz_quiz_question`.`question_id` IN (1))
ORDER BY FIELD(`xf_ozzmodz_quiz_question`.`question_id`, ) ASC
LIMIT 10
XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ASC LIMIT 10' at line 5
src\XF\Db\AbstractStatement.php:230
Generiert von: [URL='https://www.****.info/forum/admin.php?users/****-at.1/edit']****.at[/URL]
8 März 2025 um 17:49
Stack-Trace
SELECT `xf_ozzmodz_quiz_question`.*
FROM `xf_ozzmodz_quiz_question`
WHERE (`xf_ozzmodz_quiz_question`.`quiz_id` = 2) AND (`xf_ozzmodz_quiz_question`.`question_state` = 'visible') AND (`xf_ozzmodz_quiz_question`.`question_id` IN (1))
ORDER BY FIELD(`xf_ozzmodz_quiz_question`.`question_id`, ) ASC
LIMIT 10
------------
#0 src\XF\Db\Mysqli\Statement.php(207): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src\XF\Db\Mysqli\Statement.php(46): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src\XF\Db\Mysqli\Statement.php(61): XF\Db\Mysqli\Statement->prepare()
#3 src\XF\Db\AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src\XF\Mvc\Entity\Finder.php(1447): XF\Db\AbstractAdapter->query('SELECT `xf_ozzm...')
#5 src\addons\OzzModz\Quiz\ControllerPlugin\Quiz.php(387): XF\Mvc\Entity\Finder->fetch()
#6 src\addons\OzzModz\Quiz\Pub\Controller\QuizItem.php(252): OzzModz\Quiz\ControllerPlugin\Quiz->actionResults(Object(OzzModz\Quiz\Entity\QuizItem), '/forum/quiz/tes...')
#7 src\XF\Mvc\Dispatcher.php(362): OzzModz\Quiz\Pub\Controller\QuizItem->actionResults(Object(XF\Mvc\ParameterBag))
#8 src\XF\Mvc\Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('OzzModz\\Quiz:Qu...', 'Results', Object(XF\Mvc\RouteMatch), Object(OzzModz\Quiz\Pub\Controller\QuizItem), NULL)
#9 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\Quiz\Pub\Controller\QuizItem), NULL)
#10 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src\XF\App.php(2826): XF\Mvc\Dispatcher->run()
#12 src\XF.php(806): XF\App->run()
#13 index.php(23): XF::runApp('XF\\Pub\\App')
#14 {main}
Status der Anfrage
array(4) {
["url"] => string(28) "/forum/quiz/test-2.2/results"
["referrer"] => string(43) "[URL]https://www.***.info/forum/quiz/test-2.2/[/URL]"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
- Hide "select all" checkbox when no inline moderation actions available in quiz completion/play log
- Avoid SQL error when displaying results for quiz play attempt with no visible questions
- Setup "View correct answers for own quiz results" and "View correct answers explanations for own quiz results" default permissions for new installations