Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Cannot Reproduce received a few of these this morning; I upgraded to XF 2.1.2 yesterday

Discussion in 'AMS Resolved Bug Reports' started by tonmo, May 2, 2019.

  1. tonmo

    tonmo New Member AMS

    • ErrorException: Template error: Method canViewAmsArticles is not callable on the given object (XF\Entity\User)
    • src/XF/Template/Templater.php:980
    • Generated by: Unknown account
    • May 2, 2019 at 10:38 AM
    Stack trace
    #0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canViewA...', '/var/www/vhosts...', 980, Array)
    #1 src/XF/Template/Templater.php(980): trigger_error('Method canViewA...', 512)
    #2 internal_data/code_cache/navigation_cache.php(279): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewAmsArtic...', Array)
    #3 src/XF/Template/Templater.php(6628): XF\Pub\App->{closure}(Object(XF\Template\Templater), 'forums', Array)
    #4 src/XF/Pub/App.php(560): XF\Template\Templater->renderNavigationClosure(Object(Closure), 'forums', Array)
    #5 src/XF/Pub/App.php(513): XF\Pub\App->getNavigation(Array, 'forums')
    #6 src/XF/App.php(1988): XF\Pub\App->renderPageHtml('

    ...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
    #7 src/XF/Mvc/Dispatcher.php(362): XF\App->renderPage('

    ...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
    #8 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
    #9 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
    #10 src/XF.php(390): XF\App->run()
    #11 index.php(20): XF::runApp('XF\\Pub\\App')
    #12 {main}
    Request state
    array(4) {
    ["url"] => string(41) "/forums/nautilus-talk-with-dr-barord.209/"
    ["referrer"] => string(46) "Organizational Charts - Office of Institutional Research, Effectiveness, and Planning"
    ["_GET"] => array(0) {
    ["_POST"] => array(0) {
  2. Bob

    Bob Developer Staff Member

    Im running XF 2.1.2 on all my sites and instances and have not had any errors at all pop up yet, so not quite sure what would be causing that as there is nothing in XF 2.1.2 that would effect AMS (specially a permissions check).

    canViewAmsArticles is a method in the xf user entity that checks to see if the viewing user has permission to view AMS.

        public function canViewAmsArticles(&$error null)
    One cause that could be happening is that you have an addon that is not properly extending the XF User Entity (which breaks all addons that are also extending the xf user entity). This happens quite often with novices that are just learning. Thats really the only thing I can think of off the top of my head.

    Is it constant? or just 1 or 2? Go ahead and delete them and see if they pop up again.
  3. tonmo

    tonmo New Member AMS

    Not constant; was a batch of 8 or so. I'll monitor and report back any learnings. Thanks for prompt response!
    Bob likes this.
  4. Bob

    Bob Developer Staff Member

    Thank you :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.