Fixed Mass errors: ErrorException: Template error: Template public:alert_xfmg_comment_watch_comment is unknown

gotski

Active member
Hello, after updating my project, I get a lot of errors. Please help.

  • ErrorException: Template error: Template public:alert_xfmg_comment_watch_comment is unknown
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/var/www/ftp0/d...', 564, Array)
#1 src/XF/Template/Templater.php(564): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(519): XF\Template\Templater->getTemplateData('public', 'alert_xfmg_comm...')
#3 src/XF/Template/Templater.php(1229): XF\Template\Templater->getTemplateCode('public', 'alert_xfmg_comm...')
#4 src/XF/Alert/AbstractHandler.php(67): XF\Template\Templater->renderTemplate('alert_xfmg_comm...', Array)
#5 src/XF/Entity/UserAlert.php(67): XF\Alert\AbstractHandler->render(Object(XF\Entity\UserAlert))
#6 [internal function]: XF\Entity\UserAlert->render()
#7 src/XF/Template/Templater.php(920): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l1/s2/public/alert_macros.php(18): XF\Template\Templater->method(Object(XF\Entity\UserAlert), 'render', Array)
#9 src/XF/Template/Templater.php(643): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l1/s2/public/account_alerts_popup.php(18): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#11 src/XF/Template/Templater.php(1230): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts_...', Array)
#13 src/XF/Mvc/Renderer/Json.php(81): XF\Template\Template->render()
#14 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Account\\Aler...', 'public:account_...', Array)
#15 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Json->renderView('XF:Account\\Aler...', 'public:account_...', Array)
#16 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#18 src/XF/App.php(1879): XF\Mvc\Dispatcher->run()
#19 src/XF.php(328): XF\App->run()
#20 index.php(13): XF::runApp('XF\\Pub\\App')
#21 {main}

Request state
array(4) {
["url"] => string(175) "/account/alerts-popup?_xfRequestUri=%2Fconversations%2Fuse.1507811%2F&_xfWithData=1&_xfToken=1512755047%2Cf0b2958564d83a71413863fbd84201a4&_xfResponseType=json&_=1512755047834"
["referrer"] => string(55) "https://sitename.com/conversations/use.1507811/"
["_GET"] => array(5) {
["_xfRequestUri"] => string(27) "/conversations/use.1507811/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1512755047,f0b2958564d83a71413863fbd84201a4"
["_xfResponseType"] => string(4) "json"
["_"] => string(13) "1512755047834"
}
["_POST"] => array(0) {
}
}
 
This can, for the most part, be disregarded. This is from an XF1 alert and the error will go away over time.

However, I think it's something we should probably account for, so moving to XFMG bugs.
 
Thanks, this is fixed for the next release but it is not retroactive. It will only cover brand new upgrades.

If you did want to fix it yourself you can just run this query:
SQL:
UPDATE xf_user_alert
SET `action` = 'insert'
WHERE `action` = 'watch_comment'
   AND content_type = 'xfmg_comment'
 
Back
Top Bottom