[Andrew] Moderator Panel

[Andrew] Moderator Panel 2.0.9

No permission to download
AndrewSimm updated [Andrew] Moderator Panel with a new update entry:

UPDATED: Check for spam cleaner log instead of spam cleaner phrase for when not showing spam cleaned users on banned
Many thanks Andrew - works perfectly in the main banned user list in the side navigation, but the Recently banned users dashboard widget still showing spam cleaned banned users.
 
Error when changing user note to a newly created category (cat ID =4). NB: only happens with one specific user, is OK when changing other user notes to this category:

Code:
F\Db\Exception: MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '`caf_15_2`.`xf_andrew_mp_user_note_category`.`use_count` - 1' src/XF/Db/AbstractStatement.php:230
Generated by: Pete Thomas Aug 14, 2024 at 11:48 AM
Stack trace
                    UPDATE xf_andrew_mp_user_note_category
                    SET use_count = use_count - 1
                    WHERE note_category_id = ?
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1690, '22003')
#1 src/XF/Db/Mysqli/Statement.php(78): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1690, '22003')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/addons/Andrew/ModeratorPanel/Entity/UserNote.php(84): XF\Db\AbstractAdapter->query('
              ...', 3)
#4 src/XF/Mvc/Entity/Entity.php(1282): Andrew\ModeratorPanel\Entity\UserNote->_postSave()
#5 src/addons/Andrew/ModeratorPanel/Pub/Controller/UserNote.php(124): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Dispatcher.php(352): Andrew\ModeratorPanel\Pub\Controller\UserNote->actionSave(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('Andrew\\Moderato...', 'Save', Object(XF\Mvc\RouteMatch), Object(Andrew\ModeratorPanel\Pub\Controller\UserNote), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Andrew\ModeratorPanel\Pub\Controller\UserNote), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(33) "/moderatorpanel/user-notes/2/save"
  ["referrer"] => string(52) "https://cafesaxophone.com/moderatorpanel/user-notes/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(9) {
    ["_xfToken"] => string(8) "********"
    ["_xfInlineEdit"] => string(1) "1"
    ["message_html"] => string(33) "<p>Troll of the highest order</p>"
    ["noteCategory"] => string(1) "4"
    ["noteList"] => string(1) "1"
    ["user_id"] => string(4) "6736"
    ["_xfRequestUri"] => string(27) "/moderatorpanel/user-notes/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Error when changing user note to a newly created category (cat ID =4). NB: only happens with one specific user, is OK when changing other user notes to this category:

Code:
F\Db\Exception: MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '`caf_15_2`.`xf_andrew_mp_user_note_category`.`use_count` - 1' src/XF/Db/AbstractStatement.php:230
Generated by: Pete Thomas Aug 14, 2024 at 11:48 AM
Stack trace
                    UPDATE xf_andrew_mp_user_note_category
                    SET use_count = use_count - 1
                    WHERE note_category_id = ?
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1690, '22003')
#1 src/XF/Db/Mysqli/Statement.php(78): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1690, '22003')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/addons/Andrew/ModeratorPanel/Entity/UserNote.php(84): XF\Db\AbstractAdapter->query('
              ...', 3)
#4 src/XF/Mvc/Entity/Entity.php(1282): Andrew\ModeratorPanel\Entity\UserNote->_postSave()
#5 src/addons/Andrew/ModeratorPanel/Pub/Controller/UserNote.php(124): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Dispatcher.php(352): Andrew\ModeratorPanel\Pub\Controller\UserNote->actionSave(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('Andrew\\Moderato...', 'Save', Object(XF\Mvc\RouteMatch), Object(Andrew\ModeratorPanel\Pub\Controller\UserNote), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Andrew\ModeratorPanel\Pub\Controller\UserNote), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(33) "/moderatorpanel/user-notes/2/save"
  ["referrer"] => string(52) "https://cafesaxophone.com/moderatorpanel/user-notes/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(9) {
    ["_xfToken"] => string(8) "********"
    ["_xfInlineEdit"] => string(1) "1"
    ["message_html"] => string(33) "<p>Troll of the highest order</p>"
    ["noteCategory"] => string(1) "4"
    ["noteList"] => string(1) "1"
    ["user_id"] => string(4) "6736"
    ["_xfRequestUri"] => string(27) "/moderatorpanel/user-notes/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Can you walk me through how you created this error. I am having a hard time replicating.
 
Can you walk me through how you created this error. I am having a hard time replicating.
It affects only one member (so far). If I edit her user notes (e.g. edit text, or change category) I get the error when trying to save. It is odd of course because I was able to create the user note in the first place. It doesn't happen on other users created be fire or after this one. She was a particularly egregious troll so maybe it's a curse.
 
Last edited:
It affects only one member (so far). If I edit her user notes (e.g. edit text, or change category) I get the error when trying to save. It is odd of course because I was able to create the user note in the first place. It doesn't happen on other users created be fire or after this one. She was a particularly egregious troll so maybe it's a curse.
What appears to be the issue is the note count for that category is going negative. When you check note categories in the admin panel do you see a number greater than 0 beside any category used?
 
AndrewSimm updated [Andrew] Moderator Panel with a new update entry:

Version 2.0.8

FIXED: Updated recently banned users on dashboard with some show spam user logic as banned user list
FIXED: Update andrew_reg_country to allow null on entity to prevent error with NF Tickets
FIXED: Refactored how user note category counts are updated to prevent rare scenario of having a negative number
FIXED: Missing code in search users by IP address

Read the rest of this update entry...
 
OK cool. Thank you for a great addon....it is awesome.

It must be our own addons. Ill ask @xfcoder for clarification.
 
Back
Top Bottom