Not a bug ErrorException: Template error: Template public:news_feed_item_post_rating is unknown src/XF/Template/Templater.php:611

Affected version
2.1.0

BassMan

Well-known member
This is the second time I've got this. Not sure when and why exactly.

Code:
Server error log
ErrorException: Template error: Template public:news_feed_item_post_rating is unknown src/XF/Template/Templater.php:611
Generated by: Andrej 7. feb 2019 ob 23.30
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/mladiuc/p...', 611, Array)
#1 src/XF/Template/Templater.php(611): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(562): XF\Template\Templater->getTemplateData('public', 'news_feed_item_...')
#3 src/XF/Template/Templater.php(1293): XF\Template\Templater->getTemplateCode('public', 'news_feed_item_...')
#4 src/XF/NewsFeed/AbstractHandler.php(102): XF\Template\Templater->renderTemplate('news_feed_item_...', Array)
#5 src/XF/Entity/NewsFeed.php(79): XF\NewsFeed\AbstractHandler->render(Object(XF\Entity\NewsFeed))
#6 [internal function]: XF\Entity\NewsFeed->render()
#7 src/XF/Template/Templater.php(978): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l2/s1/public/news_feed_macros.php(34): XF\Template\Templater->method(Object(XF\Entity\NewsFeed), 'render', Array)
#9 src/XF/Template/Templater.php(694): XF\Template\Templater->{closure}(Object(SV\PasswordTools\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l2/s1/public/news_feed_macros.php(14): XF\Template\Templater->callMacro('news_feed_macro...', 'feed_item', Array, Array)
#11 src/XF/Template/Templater.php(694): XF\Template\Templater->{closure}(Object(SV\PasswordTools\XF\Template\Templater), Array, Array)
#12 internal_data/code_cache/templates/l2/s1/public/member_latest_activity.php(34): XF\Template\Templater->callMacro('news_feed_macro...', 'feed_row', Array, Array)
#13 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(SV\PasswordTools\XF\Template\Templater), Array)
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('member_latest_a...', Array)
#15 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#16 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Member\\Lates...', 'public:member_l...', Array)
#17 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('XF:Member\\Lates...', 'public:member_l...', Array)
#18 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#21 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#22 src/XF.php(390): XF\App->run()
#23 index.php(20): XF::runApp('XF\\Pub\\App')
#24 {main}
 

Kirby

Well-known member
Code:
news_feed_item_post_rating
You had a 3rd party Content Rating Add-on (this one?) installed in 2.0 that was not cleanly uninstalled/disabled/imported.
Contact the author for support.
 

ozzy47

Well-known member
Code:
news_feed_item_post_rating
You had a 3rd party Content Rating Add-on (this one?) installed in 2.0 that was not cleanly uninstalled/disabled/imported.
Contact the author for support.
Yeah, that seems like the real candidate, well spotted.. 👍
 

Xon

Well-known member
This happens as news feed items are not scoped to add-ons like alerts are, nor do they cleanly fail like alerts @Mike

This SQL should remove the bad data;
SQL:
delete from xf_news_feed where content_type = 'post' and action = 'rating'
 
Top