XF 2.2 manual rebuild jobs

Muddy Boots

Well-known member
I keep getting this in the ACP every 3 or 4 days, whilst I click the link and all is good, question is what isnt running and why - so where do I look ?Screenshot 2022-04-07 at 10.29.22.webp
 
Nothing in the cron I can see - all looks healthy

However in server logs have a load of errors

Screenshot 2022-04-07 at 14.08.53.png

Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewResources is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1186
Generated by: Unknown account Apr 7, 2022 at 12:05 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nginx/dom...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewR...', 512)
#2 internal_data/code_cache/navigation_cache.php(535): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewResource...', Array)
#3 src/XF/Template/Templater.php(7491): XF\Pub\App->{closure}(Object(XF\Template\Templater), NULL, Array)
#4 src/XF/Pub/App.php(577): XF\Template\Templater->renderNavigationClosure(Object(Closure), NULL, Array)
#5 src/XF/Pub/App.php(528): XF\Pub\App->getNavigation(Array, NULL)
#6 src/XF/App.php(2149): XF\Pub\App->renderPageHtml('

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

<div class="b...', Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#9 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#10 src/XF.php(517): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(50) "///remote/fgt_lang?lang=/../../../..//////////dev/"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["/remote/fgt_lang"] => string(0) ""
    ["lang"] => string(26) "/../../../..//////////dev/"
  }
  ["_POST"] => array(0) {
  }
}

I'm using a bolt theme - is it a theme template error ?
 
It's most likely a style issue, possibly third party add-on.

Is the style and all add-ons compatible with the version of XF which is running?
 
Nothing in the cron I can see - all looks healthy

However in server logs have a load of errors

View attachment 266944

Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewResources is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1186
Generated by: Unknown account Apr 7, 2022 at 12:05 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nginx/dom...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewR...', 512)
#2 internal_data/code_cache/navigation_cache.php(535): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewResource...', Array)
#3 src/XF/Template/Templater.php(7491): XF\Pub\App->{closure}(Object(XF\Template\Templater), NULL, Array)
#4 src/XF/Pub/App.php(577): XF\Template\Templater->renderNavigationClosure(Object(Closure), NULL, Array)
#5 src/XF/Pub/App.php(528): XF\Pub\App->getNavigation(Array, NULL)
#6 src/XF/App.php(2149): XF\Pub\App->renderPageHtml('

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

<div class="b...', Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#9 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#10 src/XF.php(517): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(50) "///remote/fgt_lang?lang=/../../../..//////////dev/"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["/remote/fgt_lang"] => string(0) ""
    ["lang"] => string(26) "/../../../..//////////dev/"
  }
  ["_POST"] => array(0) {
  }
}

I'm using a bolt theme - is it a theme template error ?

Those are all coming from navigation items from XFMG and XFRM. Do you have anything in your config.php disabling listeners? That'd disable the class extension on the User entity that adds the methods there, but wouldn't disable the navigation items
 
Those are all coming from navigation items from XFMG and XFRM. Do you have anything in your config.php disabling listeners? That'd disable the class extension on the User entity that adds the methods there, but wouldn't disable the navigation items

Nope

Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = 'XF';
$config['db']['password'] = '***************';
$config['db']['dbname'] = 'XF';

$config['fullUnicode'] = true;


$config['enableAddOnArchiveInstaller'] = true;

$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => ''
];

Test in a default style with no customisations to rule out the third party style.

Try rebuilding the master data via /install.
Done the rebuild, will see what happens over the next day or so
 
PixelExit @Russ has replied to my ticket on the theme and its not theme related

I don't believe it's style related at all. I see your thread on XF, I'd post progress there and they'll be better equipped to handle it.

The canViewResources is a bit strange, we don't modify any resource templates.
 
Back
Top Bottom