XF 2.2 ErrorException: Template error: [E_USER_WARNING] Method canViewMedia is not callable on the given object (XF\Entity\User) src/XF/Template/Templat

and2

New member
Good evening,

I am getting the following error in my server log regularly:

Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewMedia is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1179

This is the stacktrace:

Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/usr/www/users/...', 1179, Array)
#1 src/XF/Template/Templater.php(1179): trigger_error('Method canViewM...', 512)
#2 internal_data/code_cache/navigation_cache.php(333): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewMedia', Array)
#3 src/XF/Template/Templater.php(7471): XF\Pub\App->{closure}(Object(XF\Template\Templater), NULL, Array)
#4 src/XF/Pub/App.php(575): XF\Template\Templater->renderNavigationClosure(Object(Closure), NULL, Array)
#5 src/XF/Pub/App.php(526): XF\Pub\App->getNavigation(Array, NULL)
#6 src/XF/App.php(2142): XF\Pub\App->renderPageHtml('

<div class="b...', Array, Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#7 src/XF/Mvc/Dispatcher.php(402): XF\App->renderPage('

<div class="b...', Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#9 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#10 src/XF.php(512): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

How do I fix this?

Whats the cause? Has it something to do with user access rights?

Thanks
Andreas
 
Top