Highlight Content per Usergroup

Highlight Content per Usergroup 2023-04-19

No permission to download

Old Nick

Well-known member
Nicolas FR submitted a new resource:

Highlight Content per Usergroup - Highlight content from Staff, banned members or 4 user groups of your choice.

My add-ons (and most add-ons here on XenForo) most often end up on Nulled communities for a few hours. In an attempt to limit the illegal dissemination of my work, my add-ons are now only accessible via my forum on which you will have to register and then check your XenForo license.

They will remain free until version XF 2.3. The XF 2.3 compatible versions will then all be accessible via an annual subscription (XF 2.2 versions will remain free). This is unfortunately...

Read more about this resource...
 
The following error is returned by the addon:
Screenshot 2023-02-20 at 2.36.34 PM.webp
Code:
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nergiza/p...', 1177, Array)
#1 src/XF/Template/Templater.php(1177): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s10/public/post_macros.php(24): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#5 internal_data/code_cache/templates/l2/s10/public/post_macros.php(165): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l2/s10/public/post_macros.php(206): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(825): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l2/s10/public/thread_view.php(868): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#11 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
 
Hello @Ivancas, did this error occurs since my last add-on update?
In my opinion* this error is triggered by the Top Posters of the Month (TPM) add-on by xenMade which is not updated since 2020.
Code:
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
Try disable this add-on and let me know...

*But I could be wrong
 
Hello @Ivancas, did this error occurs since my last add-on update?
In my opinion* this error is triggered by the Top Posters of the Month (TPM) add-on by xenMade which is not updated since 2020.
Code:
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(xenMade\TPM\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
Try disable this add-on and let me know...

*But I could be wrong
I've uninstalled the addon and I'm still getting errors:
Code:
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nergiza/p...', 1177, Array)
#1 src/XF/Template/Templater.php(1177): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s10/public/post_macros.php(24): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#5 internal_data/code_cache/templates/l2/s10/public/post_macros.php(165): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l2/s10/public/post_macros.php(206): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(825): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l2/s10/public/thread_view.php(868): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#11 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
 
Yep, and the error is now triggered by Nulumia SeoTools...
Code:
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))

I used the Highlight Content per Usergroup with the last XF release without any problem.
Deactivate it and see if the errors persists, I would bet so. Let me know... (I had this error and it has been resolved : https://xenforo.com/community/threads/conditional-thread-creator-is-member-of.210670/post-1604362 )

Regarding the TPM add-on, it should be updated soon to avoid this error.
 
Yep, and the error is now triggered by Nulumia SeoTools...
Code:
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(Nulumia\SeoTools\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))

I used the Highlight Content per Usergroup with the last XF release without any problem.
Deactivate it and see if the errors persists, I would bet so. Let me know... (I had this error and it has been resolved : https://xenforo.com/community/threads/conditional-thread-creator-is-member-of.210670/post-1604362 )

Regarding the TPM add-on, it should be updated soon to avoid this error.
After disabling nulumia I'm still getting errors:
Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method isMemberOf on a non-object (NULL) src/XF/Template/Templater.php:1177
Generated by: Unknown account Feb 21, 2023 at 6:41 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nergiza/p...', 1177, Array)
#1 src/XF/Template/Templater.php(1177): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s10/public/post_macros.php(24): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#5 internal_data/code_cache/templates/l2/s10/public/post_macros.php(165): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l2/s10/public/post_macros.php(206): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(825): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l2/s10/public/thread_view.php(826): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#11 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}

I think your addon has a bug and it's reporting the error is somewhere except your addon. There is no mention of any addon here so what do you think it's trigerring the error?
 
Could you please provide the entire error log ? (request state)

I think your addon has a bug and it's reporting the error is somewhere except your addon. There is no mention of any addon here so what do you think it's trigerring the error?
If so, I'll find the solution, but on your side, what makes you say that it's my add-on that causes these errors? Have you tried disabling it and seeing if the errors persist? Maybe he conflicts with others, I don't know.

In any case I will accompany you to find the solution, I am like you and do not like repeated errors in my PCA. Disable (don't uninstall) my add-on first and see if the error persists please.
 
@Nicolas FR sorry, I uninstalled and installed the new version and the error stills:
Code:
[LIST]
[*]ErrorException: Template error: [E_USER_WARNING] Cannot call method isMemberOf on a non-object (NULL)
[*]src/XF/Template/Templater.php:1177
[*]Generated by: Unknown account
[*]Feb 22, 2023 at 4:17 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nergiza/p...', 1177, Array)
#1 src/XF/Template/Templater.php(1177): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s10/public/post_macros.php(24): XF\Template\Templater->method(NULL, 'isMemberOf', Array)
#3 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#5 internal_data/code_cache/templates/l2/s10/public/post_macros.php(165): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(988): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(924): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l2/s10/public/post_macros.php(206): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(825): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l2/s10/public/thread_view.php(826): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#11 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(43) "/foro/threads/pvpc-y-comercializadoras.458/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
This is the solution:
 
The last update was not concerning this error.

Disable (don't uninstall) my add-on first and see if the error persists please.
PLEASE do that.
There are not many members using this add-on but there are a few including me and I am absolutely not getting this error and I have no feedback from other users. Please disable my add-on and check if the error persists.

@Gemma i know you are using this add-on, can i get your feedback on this? Are you getting this type of error? THANKS.
 
I said I uninstalled the addon and then installed the new version.
No, please DEACTIVATE my add-on, don't install any others releases, juste DEACTIVATE it and see if this kind of errors persists.
Please post here or on my forum but not both, I don't know where to answer you...
 
No, please DEACTIVATE my add-on, don't install any others releases, juste DEACTIVATE it and see if this kind of errors persists.
Please post here or on my forum but not both, I don't know where to answer you...
The error belongs to your addon because as soon as I enable it I get new errors.
Now, I'll kindly appreciate if you can follow my explanation:
This user (https://xenforo.com/community/threads/hide-post-username-if-member-of-group.206490/post-1577234) experienced the same issue using the same conditional as you. He was stricly applying the conditional to a template, not an addon.

So, your conditional needs "$post.User AND" to be added before {{$post.User.isMemberOf.

I know you can't reproduce the issue but I provided a valid context where the only syntax of the conditional you are using triggers the same error so it isn't an issue with a particular addon, it's an issue of the conditional itself.
 
Back
Top Bottom