[Andrew] Moderator Panel

[Andrew] Moderator Panel 1.9.4

No permission to download
Several repeated errors like this one:

Code:
Server error log

    ErrorException: Template error: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1186

    Generated by: Unknown account Jun 17, 2022 at 12:42 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/forums...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewR...', 512)
#2 internal_data/code_cache/templates/l1/s3/public/PAGE_CONTAINER.php(1702): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewReports', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Pub/App.php(564): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#5 src/XF/App.php(2150): XF\Pub\App->renderPageHtml('...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#6 src/XF/Mvc/Dispatcher.php(404): XF\App->renderPage('...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#7 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#8 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(45) "/threads/your-favorite-ebmm-neck.39002/page-3"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Several repeated errors like this one:

Code:
Server error log

    ErrorException: Template error: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1186

    Generated by: Unknown account Jun 17, 2022 at 12:42 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/forums...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewR...', 512)
#2 internal_data/code_cache/templates/l1/s3/public/PAGE_CONTAINER.php(1702): XF\Template\Templater->method(Object(XF\Entity\User), 'canViewReports', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Pub/App.php(564): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#5 src/XF/App.php(2150): XF\Pub\App->renderPageHtml('...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#6 src/XF/Mvc/Dispatcher.php(404): XF\App->renderPage('...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#7 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#8 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(45) "/threads/your-favorite-ebmm-neck.39002/page-3"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
What version?
 
I've seen errors like this during upgrades of mods that extend the User entity. I don't have any occurrences on my website so I don't think there is an issue with this add-on. That said, if you have any other information that may point to a scenario where this occurs and can thus pre prevented then I am open for some type of change.
 
Uninstalling the addon fixes them but I need to use the addon. Suggestions?
So you did uninstall and install again and then the errors appear again?
How did you "uninstall" exactly? Via ACP uninstall routine? Did you also delete all server-side dirs/files manually? Were there any leftover "vagabond" templates in (child) styles or files or other data entries after uninstall?

btw: "canViewReports" points to Report Improvements: https://xenforo.com/community/resources/report-queues-and-stats.5555/updates#resource-update-26362
Does the error disappear by deactivating Report Improvements temporarily?

btw2: What about this error, is it solved or connected? -> https://xenforo.com/community/threa...a-is-not-callable-on-the-given-object.206103/

ps: sorry, maybe this post fits better here: https://xenforo.com/community/threads/can-anyone-tell-me-what-is-producing-these-errors.206991/
 
Last edited:
Several. It doesn't occur every day but frequently.

I've just disabled Xon's Report Improvements and Thread Ban Teeth to see if either of those is in conflict.

I'll follow up here later.
 
Hi Andrew,

Is there a way to "sort" the entries by date or alphabetically? That would be really helpful especially for listing User data. If the option exists, I didn't see it.

Banned users
Recently warned users
Discouraged users
Thread reply bans
Moderated users
User notes
Etc.

Thanks!
 
Hi Andrew,

Is there a way to "sort" the entries by date or alphabetically? That would be really helpful especially for listing User data. If the option exists, I didn't see it.

Banned users
Recently warned users
Discouraged users
Thread reply bans
Moderated users
User notes
Etc.

Thanks!
No there isn't. I need to add filters as well as a few other options mentioned by users. I will get to it when I can. I am sorry for the delay on features and fixes.
 
No there isn't. I need to add filters as well as a few other options mentioned by users. I will get to it when I can. I am sorry for the delay on features and fixes.

Thanks, that would be truly helpful for mods and admins needing to follow up on applied discipline. :)
 
Hello @AndrewSimm , I've been using your excellent moderator control panel add-on for a couple of years now.

I've just realised that moderators whose accounts I created after installing the add-on do not show up in the moderator activity log.

All the moderators have the same permissions and according to the permissions analyzer in XF they should all have access to the view the change log.

I've just updated to the latest version but this did not fix the issue. I also tried uninstalling and reinstalling but again this didn't work. There are no errors in the error log. Any ideas please? Thanks for any help you can give.
 
Last edited:
Hello @AndrewSimm , I've been using your excellent moderator control panel add-on for a couple of years now.

I've just realised that moderators whose accounts I created after installing the add-on do not show up in the moderator activity log.

All the moderators have the same permissions and according to the permissions analyzer in XF they should all have access to the view the change log.

I've just updated to the latest version but this did not fix the issue. I also tried uninstalling and reinstalling but again this didn't work. There are no errors in the error log. Any ideas please? Thanks for any help you can give.
The moderator log should match the same log in the admin panel. Can you validate you can see their actions in the moderator log in the admin panel?
 
The moderator log should match the same log in the admin panel. Can you validate you can see their actions in the moderator log in the admin panel?
I see. It does match the control panel same log. I will follow up with XF support about this. Thanks for the reply.
 
Hi, is there a way to make XF's built-in admin tools disappear from being indexed? I have no need for them since I use this great add-on.
Thanks to the creator of this plugin.
 
AndrewSimm updated [Andrew] Moderator Panel with a new update entry:

Version 1.7.0

ADDED: Moderator tools option for moderators to add or remove users from user groups
ADDED: Admin option to select which secondary user groups are available to be added or removed
ADDED: Admin option to prevent "is staff" from having their user groups updated
ADDED: Admin option to prevent "is moderator" from having their user groups updated
ADDED: User group editing to the protected users system
ADDED: Edit to user notes
ADDED: Add admin search options to user file search
ADDED: Edit own...

Read the rest of this update entry...
 
The big updates here are:
1) Ability to add users to secondary user groups
2) More search options when searching for an user file
3) Ability to edit user notes

Of course all of this can be controlled via permissions and updating user groups works with the protection system this mods has.
 
I'm getting closer to going live. An additional feature I would really like on the Moderator Panel is a link to see all STAFF users and then also, in searching for users, I really need the ability to filter/select by user group. I had a lot of different user groups on my old forum and I need to manage consolidating them, but I have to see who's who and right now, it's challenge flipping around trying to figure out my strategy. We'll have interim users between banned and in good status and I need to quickly see those folks on the moderator panel. Thank you greatly for considering it!
I've added the ability to search by user group in version 1.7.0.
 
Bug
If a moderator has permission to moderate users but no (valid) usergroup has been configured in ACP, the option to moderate users is still being shown but effectively does nothing.
If no valid usergroup has been configured the menu entry should not be shown at all (and direct calls to the actions should probably give an error).
This has been fixed in 1.7.0.
 
Top Bottom