• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to 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.

Answered Possible Bug on Error Log

btmgreg

New Member
AMS Premium
SC Premium
XenAddons Showcase 3.2.16

Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewCalendars is not callable on the given object (XenAddons\Showcase\XF\Entity\User) src/XF/Template/Templater.php:1186
Generated by: Unknown account Feb 7, 2022 at 10:39 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/behindthe...', 1186, Array)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewC...', 512)
#2 internal_data/code_cache/navigation_cache.php(550): XF\Template\Templater->method(Object(XenAddons\Showcase\XF\Entity\User), 'canViewCalendar...', Array)
#3 src/XF/Template/Templater.php(7491): XF\Pub\App->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), 'EWRmedio', Array)
#4 src/XF/Pub/App.php(577): XF\Template\Templater->renderNavigationClosure(Object(Closure), 'EWRmedio', Array)
#5 src/XF/Pub/App.php(528): XF\Pub\App->getNavigation(Array, 'EWRmedio')
#6 src/XF/App.php(2149): XF\Pub\App->renderPageHtml('



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


<di...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), '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(34) "/media/?keywords=56.42.47.62.53.53"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["keywords"] => string(17) "56.42.47.62.53.53"
  }
  ["_POST"] => array(0) {
  }
}
 
canViewCalendars <--- that is NOT a function of Showcase.

My GUESS is that you have an addon for Calendars and it extends the XF User Entity and is currently disabled.

Its common with XF for addons to extend the User Entity and add Permissions Checks to the Navigation System and by disabling one of those addons, it will throw that error (happens with XFMG all the time).

Do you have ANY addons that are extending the USER entity that are disabled?
 
Hmm. I do have a calendar addon, and it's enabled for myself - but blocked for regular members/guests at this moment in time.

I'm not aware of any other addons I have that does extend the USER entity. I've been playing around with the calendar for the past few days (it's been installed for a long time without me seeing this error) - but it's only tonight the error appeared in the ACP.
 
That error is being thrown, because a Calendar Addon that has a function called canViewCalendars() is installed on your site and is extending the User Entity adding some functions, and SOMETHING (could be a TM for the AMP addon by MAZ) is attempting to CALL that function and that function (for what ever reason) is not properly being added by the Class Extension System to be included in the USER Entity so that it can be accessed, hence the error that its not callable on the object (as something is either preventing it from being added to the object or something removed it from the object). I can 100% assure that its not anything to do with Showcase. Its another addon that is causing that problem. MOST of the time, this is due to an improperly coded addon that does not properly extend something. Its extremely frustrating as the culprit doesn't appear in the stack trace, just the LAST thing thing that extends the USER Entity (in this case, Showcase is the LAST addon that is extending the User Entity and by then, that function has already been removed.

I know its frustrating from an admin perspective, but its equally frustrating for developers that know what they are doing always having to deal with issues caused by people that do not know what they are doing.
 
That error is being thrown, because a Calendar Addon that has a function called canViewCalendars() is installed on your site and is extending the User Entity adding some functions, and SOMETHING (could be a TM for the AMP addon by MAZ) is attempting to CALL that function and that function (for what ever reason) is not properly being added by the Class Extension System to be included in the USER Entity so that it can be accessed, hence the error that its not callable on the object (as something is either preventing it from being added to the object or something removed it from the object). I can 100% assure that its not anything to do with Showcase. Its another addon that is causing that problem. MOST of the time, this is due to an improperly coded addon that does not properly extend something. Its extremely frustrating as the culprit doesn't appear in the stack trace, just the LAST thing thing that extends the USER Entity (in this case, Showcase is the LAST addon that is extending the User Entity and by then, that function has already been removed.

I know its frustrating from an admin perspective, but its equally frustrating for developers that know what they are doing always having to deal with issues caused by people that do not know what they are doing.
Completely appreciate your answer, and I know for sure - it can't be showcase or your products. I have done a bit of cleanup and uninstalled any inactive addons. I did install / and then disable an addon the other day to extend custom fields. It may be that, but the only thing I was messing with was the calendar addon around the time the error produced, so who knows.

I've cleared the error log now, lets see if it re-appears. I appreciate your detailed response. Keeping my eye out on the RMS addon for event/calendar features.. I may be in a better position then! ;) *crosses fingers and toes*
 
  • Like
Reactions: Bob
Back
Top