XF 2.1 Not sure what's happening, to be honest.

craftking

Member
Hello, I keep getting this error, when I try to do certain things (edit posts seems to be the most common), like editing on the Adminc CP. I'm afraid I'm not as tech savvy as I would like to admit, and am in desperate need of assistance.

The changes sometimes will take effect, but sometimes won't (especially in the Admin CP).


What can I do to resolve this?


Here is the first one (second one, below):

Server error log
  • ErrorException: Template error: Method canLike is not callable on the given object (XF\Entity\Post)
  • src/XF/Template/Templater.php:994
  • Sep 7, 2019 at 12:43 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canLike ...', '/home/rainnmsd/...', 994, Array)
#1 src/XF/Template/Templater.php(994): trigger_error('Method canLike ...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/EWRporta_article_macros.php(577): XF\Template\Templater->method(Object(XF\Entity\Post), 'canLike', Array)
#3 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s1/public/thread_view.php(582): XF\Template\Templater->callMacro('EWRporta_articl...', 'article_comment', Array, Array)
#5 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#6 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#7 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#9 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#13 src/XF.php(390): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
Request state
array(4) {
["url"] => string(66) "/index.php?threads/welcome-we-have-some-news-to-share-with-you.11/"
["referrer"] => string(66) "https://rainyrealms.com/index.php?forums/news-and-announcements.2/"
["_GET"] => array(1) {
["threads/welcome-we-have-some-news-to-share-with-you_11/"] => string(0) ""
}
["_POST"] => array(0) {
}
}




Here is the second one:

Server error log
  • ErrorException: Template error: Method canLike is not callable on the given object (XF\Entity\Post)
  • src/XF/Template/Templater.php:994
  • Sep 7, 2019 at 12:42 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canLike ...', '/home/rainnmsd/...', 994, Array)
#1 src/XF/Template/Templater.php(994): trigger_error('Method canLike ...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/EWRporta_article_macros.php(577): XF\Template\Templater->method(Object(XF\Entity\Post), 'canLike', Array)
#3 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s1/public/thread_view.php(582): XF\Template\Templater->callMacro('EWRporta_articl...', 'article_comment', Array, Array)
#5 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#6 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#7 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#9 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#13 src/XF.php(390): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
Request state
array(4) {
["url"] => string(66) "/index.php?threads/welcome-we-have-some-news-to-share-with-you.11/"
["referrer"] => string(66) "https://rainyrealms.com/index.php?forums/news-and-announcements.2/"
["_GET"] => array(1) {
["threads/welcome-we-have-some-news-to-share-with-you_11/"] => string(0) ""
}
["_POST"] => array(0) {
}



Any and all assistance/advice is greatly appreciated! :)
 

ozzy47

Well-known member
You have an outdated style, addon or template. Update your style to the latest version. Ensure your addons are up to date.
 
Top