Getting error on admin and mod verified tooltip

5je7taxs

Active member
Registered
Joined
Jul 31, 2023
Messages
41
Points
8

Reputation:

Getting error on admin and mod verified tooltip

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method isMemberOf on a non-object (NULL) src/XF/Template/Templater.php:1151
Generated by: Unknown account Oct 16, 2023 at 10:25 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/www/wwwroot/...', 1151)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s3/public/message_macros.php(80): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s3/public/post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#5 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#7 internal_data/code_cache/templates/l1/s3/public/post_macros.php(166): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s3/public/post_macros.php(198): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l1/s3/public/thread_view.php(928): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#13 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#15 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#17 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#21 src/XF.php(488): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
603
Points
103

Reputation:

Not sure but I think AddonFlare\PaidRegistrations is causing this problem.
Try to disable the addon and check if the error persists.

I had the same error on my OGU copy but I never bothered to actual debug the stack trace, because the conditional statement should be working just fine, can't see exactly why this statement shouldn't work.
 

5je7taxs

Active member
Registered
Joined
Jul 31, 2023
Messages
41
Points
8

Reputation:

Not sure but I think AddonFlare\PaidRegistrations is causing this problem.
Try to disable the addon and check if the error persists.

I had the same error on my OGU copy but I never bothered to actual debug the stack trace, because the conditional statement should be working just fine, can't see exactly why this statement shouldn't work.
Splichoits conditional statement error not addon fixed anyways
 

5je7taxs

Active member
Registered
Joined
Jul 31, 2023
Messages
41
Points
8

Reputation:

What was the fix? So everybody who has the same can fix it
Splicho
Code:
<xf:if is="!empty($user) AND $user.isMemberOf(3)">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-solid fa-code"></i></div>
<xf:elseif is="!empty($user) AND $user.isMemberOf(4)" />
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-duotone fa-gavel"></i></div>
</xf:if>
here you go the fixed code free from the error
 

lbebulk

Member
Registered
Joined
Apr 8, 2019
Messages
7
Points
13

Reputation:

Not sure but I think AddonFlare\PaidRegistrations is causing this problem.
Try to disable the addon and check if the error persists.

I had the same error on my OGU copy but I never bothered to actual debug the stack trace, because the conditional statement should be working just fine, can't see exactly why this statement shouldn't work.
Splichoconditional statement error not addon fixed anyways
 
Top