[Andrew] Moderator Panel

[Andrew] Moderator Panel 2.0.9

No permission to download
Just had this error:

  • ErrorException: Country could not be determined for IP:
  • src/XF/Error.php:82
  • Generated by: Unknown account
  • Jul 21, 2024 at 3:21 AM

Stack trace​

#0 src/XF.php(257): XF\Error->logError('Country could n...', false)
#1 src/addons/Andrew/ModeratorPanel/XF/Entity/User.php(519): XF::logError('Country could n...')
#2 src/XF/Mvc/Entity/Entity.php(1324): Andrew\ModeratorPanel\XF\Entity\User->_postSave()
#3 src/XF/Service/User/RegistrationService.php(320): XF\Mvc\Entity\Entity->save()
#4 src/XF/Service/ValidateAndSavableTrait.php(42): XF\Service\User\RegistrationService->_save()
#5 src/XF/Pub/Controller/RegisterController.php(451): XF\Service\User\RegistrationService->save()
#6 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\RegisterController->actionRegister(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\XF\Pub\Controller\Register), NULL)
#8 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\XF\Pub\Controller\Register), NULL)
#9 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#11 src/XF.php(798): XF\App->run()
#12 index.php(23): XF::runApp('XF\\Pub\\App')
#13 {main}

I use error messages when testing code and it looks like I left one in. It just means no country was saved. I will remove for the next release.


PHP:
protected function _postSave()
{
    parent::_postSave();

    if ($this->isInsert()) {
        $ipAddress = \XF::app()->request->getIp();
        $country = \XF::repository('XF:User')->getIpCountry($ipAddress);

        if (!empty($country)) {
            $this->fastUpdate('andrew_reg_country', $country);
        } else {
            // Log an error or handle the case where the country is NULL
            \XF::logError('Country could not be determined for IP: ' . $ipAddress);
        }
    }
}
 
I use error messages when testing code and it looks like I left one in. It just means no country was saved. I will remove for the next release.
You might want to reconsider waiting because it creates a funky window on member registration, which makes it appear that registration failed... when you resubmit out of confusion, the email address is taken and you can't.

I've disabled the addon as a result.

The AddOn is absolutely fantastic by the way. Didn't want to just leave negativity :)
 
Last edited:
You might want to reconsider waiting because it creates a funky window on member registration, which makes it appear that registration failed... when you resubmit out of confusion, the email address is taken and you can't.

I've disabled the addon as a result.

The AddOn is absolutely fantastic by the way. Didn't want to just leave negativity :)
That's interesting, I can't reproduce the "0" message.
 
So it happens when you view only the moderatorpanel/discouraged-users/ tab or viewing the user file? Does it happen on a particular tab in user file?
I just experienced the same problem after updating to the latest version. I am using XenForo 2.2.15 with PHP 8.2.21.

It happens to me right when you access moderatorpanel/discouraged-users/ and then access the profile of any discouraged user, that is, when the URL shows moderatorpanel/user/nameuser.IDUSER/ (nameuser is the username and IDUSER is the user's ID number). In my case, the user I am looking at has ID 133211, but if I look at another, the problem is exactly the same.

  • InvalidArgumentException: Accessed unknown getter 'triggred' on XF:UserBan[133211]
  • src/XF/Mvc/Entity/Entity.php:213
  • Generated by: Javilonas
  • July 21, 2024 at 10:28
Code:
Trace
#0 src/XF/Mvc/Entity/Entity.php(125): XF\Mvc\Entity\Entity->get('triggred')
#1 internal_data/code_cache/templates/l2/s3/public/andrew_moderatorpanel_user_ban_list.php(55): XF\Mvc\Entity\Entity->offsetGet('triggred')
#2 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, NULL)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('andrew_moderato...', Array)
#4 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#5 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('Andrew\\Moderato...', 'public:andrew_m...', Array)
#6 src/addons/OzzModz/OverlayDataContext/XF/Mvc/Renderer/Json.php(11): XF\Mvc\Renderer\Json->renderView('Andrew\\Moderato...', 'public:andrew_m...', Array)
#7 src/XF/Mvc/Dispatcher.php(460): OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json->renderView('Andrew\\Moderato...', 'public:andrew_m...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#11 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Code:
Request Status
array(4) {
  ["url"] => string(198) "/moderatorpanel/user/NAMEUSER.133211/current-ban?_xfRequestUri=%2Fmoderatorpanel%2Fuser%2FNAMEUSER.133211%2F&_xfWithData=1&_xfToken=1721******%2Ce7d08b579e1b0abe2eb693fc81******&_xfResponseType=json"
  ["referrer"] => string(65) "/moderatorpanel/user/NAMEUSER.133211/"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(37) "/moderatorpanel/user/NAMEUSER.133211/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1721******,e7d08b579e1b0abe2eb693fc81******"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

For privacy, I edited the username to NAMEUSER and for security, I edited parts of the token with *.
 
I just experienced the same problem after updating to the latest version. I am using XenForo 2.2.15 with PHP 8.2.21.

It happens to me right when you access moderatorpanel/discouraged-users/ and then access the profile of any discouraged user, that is, when the URL shows moderatorpanel/user/nameuser.IDUSER/ (nameuser is the username and IDUSER is the user's ID number). In my case, the user I am looking at has ID 133211, but if I look at another, the problem is exactly the same.

  • InvalidArgumentException: Accessed unknown getter 'triggred' on XF:UserBan[133211]
  • src/XF/Mvc/Entity/Entity.php:213
  • Generated by: Javilonas
  • July 21, 2024 at 10:28
Code:
Trace
#0 src/XF/Mvc/Entity/Entity.php(125): XF\Mvc\Entity\Entity->get('triggred')
#1 internal_data/code_cache/templates/l2/s3/public/andrew_moderatorpanel_user_ban_list.php(55): XF\Mvc\Entity\Entity->offsetGet('triggred')
#2 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, NULL)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('andrew_moderato...', Array)
#4 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#5 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('Andrew\\Moderato...', 'public:andrew_m...', Array)
#6 src/addons/OzzModz/OverlayDataContext/XF/Mvc/Renderer/Json.php(11): XF\Mvc\Renderer\Json->renderView('Andrew\\Moderato...', 'public:andrew_m...', Array)
#7 src/XF/Mvc/Dispatcher.php(460): OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json->renderView('Andrew\\Moderato...', 'public:andrew_m...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(OzzModz\OverlayDataContext\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#11 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Code:
Request Status
array(4) {
  ["url"] => string(198) "/moderatorpanel/user/NAMEUSER.133211/current-ban?_xfRequestUri=%2Fmoderatorpanel%2Fuser%2FNAMEUSER.133211%2F&_xfWithData=1&_xfToken=1721******%2Ce7d08b579e1b0abe2eb693fc81******&_xfResponseType=json"
  ["referrer"] => string(65) "/moderatorpanel/user/NAMEUSER.133211/"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(37) "/moderatorpanel/user/NAMEUSER.133211/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1721******,e7d08b579e1b0abe2eb693fc81******"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

For privacy, I edited the username to NAMEUSER and for security, I edited parts of the token with *.
Looks like another misspelling of the word "trigger" :(
 
Thank you for a great update!

The "Rank" column appears to be missing on "Recently registered users", "Most warned users", "Most reported users" and "Mosts ignored users" causing the number of TD columns to be one less than the TH columns and data misaligned.
 
I have just unticked Show spam cleaner users on banned users but they are still showing under Recently banned users in the moderator panel.

Great addon BTW, just about to give it 5 *****
 
I have just unticked Show spam cleaner users on banned users but they are still showing under Recently banned users in the moderator panel.
Just done this on my test forum (xf 2.3) and it seems to be fine, as expected spam cleaned users do not show .
 
Thank you for a great update!

The "Rank" column appears to be missing on "Recently registered users", "Most warned users", "Most reported users" and "Mosts ignored users" causing the number of TD columns to be one less than the TH columns and data misaligned.
Can you share a screenshot?
 
Can you share a screenshot?
My apologies if there is some customisation I have made that is causing this on my part. I believe I have turned off anything that could be affecting it, but I might have missed something. Using XF2.2.10p1 and about to upgrade to 2.3.

1721869105540.webp
 
Back
Top Bottom