[Andrew] Moderator Panel

[Andrew] Moderator Panel 2.0.8

No permission to download
@AndrewSimm I have an feature idea. I think we should send user notes with some permissions. For example we create a user group like "Admin" and I have "Admin" perms.

When I want to leave a note on his profile I don't want moderators to see this note. Maybe extension could have a page that we can import user groups and then a button can be added as in the screenshot. We have 2 user groups? 2 buttons! (More than 1 is not necessary but at least we should have some privacy like that.)

1714400291380.webp
 
Could we add a view similar to the existing approval queue that shows soft-deleted threads/other content? It would be nice to be able to review soft-deleted content for housekeeping reasons, such as hard-deleting posts older than a certain time period or reviewing what posts moderators are deleting and why, such as at a weekly stand up meeting with moderators.
 
Would it be simple to add a permission that allows users to view the edit history of their own posts, and view their own posts that have been deleted by mods?

 
Have you received the error anymore and if so what is the event surround it? (new user, recently banned, etc)

Yes, it seems that it only happens with banning. Here for example, the user (one user only) was banned at 04:14 and then these were all generated.

Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:27 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:26 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:25 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:16 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:15 AM

  • src/XF/Mvc/Entity/Entity.php:775


Code:
InvalidArgumentException: Attempted to convert NULL to string/binary [andrew_reg_country] src/XF/Mvc/Entity/Entity.php:775
Generated by:  Apr 27, 2024 at 4:25 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#1 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#2 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to string/binary - src/XF/Mvc/Entity/ValueFormatter.php:138
#0 src/XF/Mvc/Entity/Entity.php(771): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#2 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#3 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#8 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#10 src/XF.php(524): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}



But it happened here only once for another user who was also banned at the same time 04:14 but the error was thrown at 6:30. It could be because they try to visit the http://domain.com/tickets? we are using Tickets by @Naz (no permission for banned users to access the url)

Code:
InvalidArgumentException: Attempted to convert NULL to string/binary [andrew_reg_country] src/XF/Mvc/Entity/Entity.php:775
Generated by:  Apr 27, 2024 at 6:31 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#1 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#2 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to string/binary - src/XF/Mvc/Entity/ValueFormatter.php:138
#0 src/XF/Mvc/Entity/Entity.php(771): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#2 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#3 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#8 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#10 src/XF.php(524): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(12) "/forum/tickets/"
  ["referrer"] => string(36) "https://defense-arab.com/vb/account/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
Would it be simple to add a permission that allows users to view the edit history of their own posts, and view their own posts that have been deleted by mods?


Hopefully Andrew doesn't mind this link but OzzModz has a plugin for just this:'

 
Yes, it seems that it only happens with banning. Here for example, the user (one user only) was banned at 04:14 and then these were all generated.

Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:27 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:26 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:25 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:16 AM

  • src/XF/Mvc/Entity/Entity.php:775
Attempted to convert NULL to string/binary [andrew_reg_country]
  • Saturday at 4:15 AM

  • src/XF/Mvc/Entity/Entity.php:775


Code:
InvalidArgumentException: Attempted to convert NULL to string/binary [andrew_reg_country] src/XF/Mvc/Entity/Entity.php:775
Generated by:  Apr 27, 2024 at 4:25 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#1 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#2 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to string/binary - src/XF/Mvc/Entity/ValueFormatter.php:138
#0 src/XF/Mvc/Entity/Entity.php(771): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#2 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#3 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#8 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#10 src/XF.php(524): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}



But it happened here only once for another user who was also banned at the same time 04:14 but the error was thrown at 6:30. It could be because they try to visit the http://domain.com/tickets? we are using Tickets by @Naz (no permission for banned users to access the url)

Code:
InvalidArgumentException: Attempted to convert NULL to string/binary [andrew_reg_country] src/XF/Mvc/Entity/Entity.php:775
Generated by:  Apr 27, 2024 at 6:31 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#1 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#2 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to string/binary - src/XF/Mvc/Entity/ValueFormatter.php:138
#0 src/XF/Mvc/Entity/Entity.php(771): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(697): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'andrew_reg_coun...', 5, Array)
#2 src/addons/NF/Tickets/ControllerPlugin/Ticket.php(64): XF\Mvc\Entity\Entity->setTrusted('andrew_reg_coun...', NULL)
#3 src/addons/NF/Tickets/Pub/Controller/AbstractTicketController.php(23): NF\Tickets\ControllerPlugin\Ticket->preDispatchForTicket(false, 'Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Controller.php(126): NF\Tickets\Pub\Controller\AbstractTicketController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(351): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('NF\\Tickets:Tick...', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#7 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Tickets\Pub\Controller\Ticket), NULL)
#8 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#10 src/XF.php(524): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(12) "/forum/tickets/"
  ["referrer"] => string(36) "https://defense-arab.com/vb/account/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Has anyone else seen this error?
 
Is anyone interested in test 1.9.5. The updates in this version:
  • Updated for compatibility with Xenforo 2.3
  • Fixed bug where headers for recently warned users on dashboard show when no warnings exist
  • Fix bug where error occurs when an user is banned
 
It's new after the addon is installed, but there wasn't anything indicating this where you go to adjust settings. Which was my point of the original post
 
AndrewSimm updated [Andrew] Moderator Panel with a new update entry:

Version 1.9.5

  • UPDATE: Template modifications to work with both XF 2.2 and XF 2.3 (beta)
  • FIXED: Aligned display of banned date and warned date to align with how XF displays each (removed time zone in most instances)
  • FIXED: Issue where the recently warned headers would show on the dashboard even if no users have been warned
  • FIXED: Bug where error occurs when an user is banned

Read the rest of this update entry...
 
The only remaining bug is that sometimes a different date is display on the dashboard vs the banned user list. This happens despite the same value being fed into the same function. This update currently works with 2.3 beta versions but I won't support 2.3 until RC1.
 
Back
Top Bottom