[OzzModz] Country Flags by IP Address

[OzzModz] Country Flags by IP Address 2.2.1 Patch Level 3

No permission to download
I've just tried the new version you added, It didn't install as expected, but it gave me some error logs to look at.

I passed these error logs onto my server hosting provider to see if they could see anything not working their end, they replied with this,

Both the errors in the error log indicate the error related to a variable or function. Its not a server related error. Can you please check this with your website developer.

The Two errors displayed are

Screenshot (44).webp


The first Error says,

Server error log
  • ErrorException: [E_NOTICE] Undefined variable: response
  • src/addons/Snog/Flags/Setup.php:71
  • Generated by: Admin
  • Sep 21, 2018 at 1:50 PM
Stack trace
#0 src/addons/Snog/Flags/Setup.php(71): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/politic1/...', 71, Array)
#1 src/XF/AddOn/AddOn.php(460): Snog\Flags\Setup->checkRequirements(Array, NULL)
#2 src/XF/Admin/Controller/AddOn.php(633): XF\AddOn\AddOn->checkRequirements(Array, NULL)
#3 src/XF/Admin/Controller/AddOn.php(366): XF\Admin\Controller\AddOn->getAddOnWarningsAndErrors(Object(XF\AddOn\AddOn))
#4 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AddOn->actionInstall(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Install', 'json', Object(XF\Mvc\ParameterBag), 'listAddOns', Object(XF\Admin\Controller\AddOn), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#8 src/XF.php(329): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}
Request state
array(4) {
["url"] => string(167) "/admin.php?add-ons/Snog-Flags/install&_xfRequestUri=%2Fadmin.php%3Fadd-ons%2F&_xfWithData=1&_xfToken=1537534198%2Ca82b0ce1e89da6caf5ebb11a98f09348&_xfResponseType=json"
["referrer"] => string(49) "https://www.politicalirish.com/admin.php?add-ons/"
["_GET"] => array(5) {
["add-ons/Snog-Flags/install"] => string(0) ""
["_xfRequestUri"] => string(19) "/admin.php?add-ons/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1537534198,a82b0ce1e89da6caf5ebb11a98f09348"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}

The 2nd Error says

Server error log
  • Error: Call to a member function getBody() on null
  • src/addons/Snog/Flags/Setup.php:71
  • Generated by:Admin
  • Sep 21, 2018 at 1:50 PM
Stack trace
#0 src/XF/AddOn/AddOn.php(460): Snog\Flags\Setup->checkRequirements(Array, NULL)
#1 src/XF/Admin/Controller/AddOn.php(633): XF\AddOn\AddOn->checkRequirements(Array, NULL)
#2 src/XF/Admin/Controller/AddOn.php(366): XF\Admin\Controller\AddOn->getAddOnWarningsAndErrors(Object(XF\AddOn\AddOn))
#3 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AddOn->actionInstall(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Install', 'json', Object(XF\Mvc\ParameterBag), 'listAddOns', Object(XF\Admin\Controller\AddOn), NULL)
#5 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#7 src/XF.php(329): XF\App->run()
#8 admin.php(13): XF::runApp('XF\\Admin\\App')
#9 {main}
Request state
array(4) {
["url"] => string(167) "/admin.php?add-ons/Snog-Flags/install&_xfRequestUri=%2Fadmin.php%3Fadd-ons%2F&_xfWithData=1&_xfToken=1537534198%2Ca82b0ce1e89da6caf5ebb11a98f09348&_xfResponseType=json"
["referrer"] => string(49) "https://www.politicalirish.com/admin.php?add-ons/"
["_GET"] => array(5) {
["add-ons/Snog-Flags/install"] => string(0) ""
["_xfRequestUri"] => string(19) "/admin.php?add-ons/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1537534198,a82b0ce1e89da6caf5ebb11a98f09348"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}


Not sure if that sheds any light on the issue?

Thanks
 
For everyone's benefit. If you get this error (or any other error pertaining to MaxMind)...

maxminderror.webp

That is a problem with either your server or at MaxMind. I can't change anything in the add-on that I know of that will change that error.

However, this may or may not be relevant. In a problem I was having with another site not related to any of my add-ons, the same error was being produced. There was a mention of TLS not being used or available. Once they enabled that on their server everything was OK. Again, that was not related to any of my add-ons but since the error is the same it may or may not be relevant. And I am unable to say what exactly they changed. Perhaps it was an outdated cacert bundle on their server, I don't know.
 
Last edited:
Thank you for updating, altough I think it needs some css adjustements for the span inside the userflag-name div as it shows it as empty altough css rules are set. I manually adjusted it for my site and it works for the moment. (display: inherit)
 
Thank you for updating, altough I think it needs some css adjustements for the span inside the userflag-name div as it shows it as empty altough css rules are set. I manually adjusted it for my site and it works for the moment. (display: inherit)
Please clarify what you mean (screenshot). I can see the flag everywhere it's suppose to be in both XF 2.0 and XF 2.1.
 
For the "Show below user name" option, it showed as an empty space, so I had to add display:inherit to the .flags class in order to make it vieweable.
 
Just updated to 2.0.9. Maybe I'm forgetting something but the plugin seems to be ignoring my display preferences. Flags are in forums I've disabled them in.
 
Just updated to 2.0.9. Maybe I'm forgetting something but the plugin seems to be ignoring my display preferences. Flags are in forums I've disabled them in.
If you're talking about the thread list in a forum, could you double check the settings in Admin->Setup->Options?

I can't duplicate what you're saying is happening

If you're talking about in posts in a forum, there is no option to disable them on a forum by forum basis.
 
Top Bottom