[OzzModz] Country Flags by IP Address

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

No permission to download
I'd second an update/revamp, as the current flag set is outdated (some flags have changed, and some countries are missing). :)
 
I got this error when I tried to save the configuration:

ops! We ran into some problems.
ErrorException: [E_WARNING] Declaration of Snog\Flags\XF\FsMounts::loadDefaultMounts(array $config) should be compatible with DigitalPoint\Cloudflare\XF\FsMounts::loadDefaultMounts(array $config, $allowAdaptersNotInConfig = true) in src/addons/Snog/Flags/XF/FsMounts.php at line 0
  1. XF::handlePhpError() in src/vendor/composer/ClassLoader.php at line 571
  2. include() in src/vendor/composer/ClassLoader.php at line 571
  3. Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 428
  4. Composer\Autoload\ClassLoader->loadClass()
  5. spl_autoload_call()
  6. class_exists() in src/XF/Extension.php at line 174
  7. XF\Extension->extendClass() in src/XF/App.php at line 3004
  8. XF\App->extendClass() in src/XF/App.php at line 1117
  9. XF\App->XF\{closure}() in src/XF/Container.php at line 31
  10. XF\Container->offsetGet() in src/XF/App.php at line 2732
  11. XF\App->fs() in src/XF/Util/File.php at line 200
  12. XF\Util\File::copyFileToAbstractedPath() in src/addons/Snog/Flags/Util/GeoLite2.php at line 41
  13. Snog\Flags\Util\GeoLite2::saveDatabaseFile() in src/addons/Snog/Flags/Option/MaxMindKey.php at line 36
  14. Snog\Flags\Option\MaxMindKey::verifyOption() in src/XF/Entity/Option.php at line 208
  15. XF\Entity\Option->verifyOptionValue() in src/XF/Mvc/Entity/Entity.php at line 798
  16. XF\Mvc\Entity\Entity->_verifyValueCustom() in src/XF/Mvc/Entity/Entity.php at line 643
  17. XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 577
  18. XF\Mvc\Entity\Entity->__set() in src/XF/Repository/Option.php at line 113
  19. XF\Repository\Option->updateOptions() in src/addons/KL/EditorManager/XF/Repository/Option.php at line 32
  20. KL\EditorManager\XF\Repository\Option->updateOptions() in src/XF/Admin/Controller/Option.php at line 86
  21. XF\Admin\Controller\Option->actionUpdate() in src/XF/Mvc/Dispatcher.php at line 352
  22. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  23. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  24. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  25. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
  26. XF\App->run() in src/XF.php at line 524
  27. XF::runApp() in admin.php at line 13
 
I'd second an update/revamp, as the current flag set is outdated (some flags have changed, and some countries are missing). :)
Have you looked into manually updating the flagsprite.png? I’d imagine that’s the next best option for us that would like to update the flag graphics to modern gen
 
Have you looked into manually updating the flagsprite.png? I’d imagine that’s the next best option for us that would like to update the flag graphics to modern gen

I did. I also changed the flag set, but having all that out of the box would be nice. :)
 
OOTB is nice for a lot of things, especially for those site builders who might find the spritesheet process a bit too daunting.

My greater thoughts though run to add-ons being functional into the future--and working correctly out of the box. No one has addressed this issue for new installations (link goes to post #700):


The discontinuity between where the program installs the files, and where it looks for them is kind of a deal killer for many prospective site owners. Users should not have to shift into dev mode or add override instructions in the extra.less file.

I am happy that I had just enough sense to figure out the issue. Well, my cat helped me a bit. But what about those who don't have a helpful cat and are left wondering why this great plugin does not work after installation? :cool:
 
I'm running XF 2.2.13 and just updated Country Flags to 2.2.0 Patch Level 4 but the flags still aren't displaying and I'm seeing the following errors:

Code:
InvalidArgumentException: Accessed unknown getter 'snog_flag' on XF:User[1] src/XF/Mvc/Entity/Entity.php:213
Generated by: XXX May 23, 2023 at 10:45 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(125): XF\Mvc\Entity\Entity->get('snog_flag')
#1 internal_data/code_cache/templates/l1/s18/public/message_macros.php(50): XF\Mvc\Entity\Entity->offsetGet('snog_flag')
#2 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#3 internal_data/code_cache/templates/l1/s18/public/post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#4 src/XF/Template/Templater.php(990): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#5 src/XF/Template/Templater.php(926): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#6 internal_data/code_cache/templates/l1/s18/public/post_macros.php(169): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(990): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(926): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l1/s18/public/post_macros.php(222): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 internal_data/code_cache/templates/l1/s18/public/thread_view.php(844): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#12 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#14 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#15 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#16 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#19 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#20 src/XF.php(524): XF\App->run()
#21 index.php(20): XF::runApp('XF\\Pub\\App')
#22 {main}
Request state
array(4) {
  ["url"] => string(25) "/threads/paper-wasp.2974/"
  ["referrer"] => string(23) "https://xx.com/"
  ["_GET"] => array(1) {
    ["/threads/paper-wasp_2974/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Would be great if you could take a look @Ozzy47 when you have time :)
 
Code:
ErrorException: [E_WARNING] PharData::__construct(): open_basedir restriction in effect. File(/var/www/vhosts/xyz.ch) is not within the allowed path(s): (/var/www/vhosts/xyz.ch/xyz.ch:/usr/share/php:/usr/share/pear) in src/addons/Snog/Flags/Util/GeoLite2.php at line 57
I use EHCP force panel.
 
InvalidArgumentException: Accessed unknown getter 'snog_flag' on XF:User[1] src/XF/Mvc/Entity/Entity.php:213
It might be caused by broken code event listeners by some add-ons like [AL] Core Package (fixed in latest update, but requires rebuilding broken add-on data)

If it's not installed, just try to rebuild the addon data

ErrorException: [E_WARNING] PharData::__construct(): open_basedir restriction in effect. File(/var/www/vhosts/xyz.ch)
This is a server configuration issue
Many addons need access for read and write access to "internal_data" folder
 
It might be caused by broken code event listeners by some add-ons like [AL] Core Package (fixed in latest update, but requires rebuilding broken add-on data)

If it's not installed, just try to rebuild the addon data


This is a server configuration issue
Many addons need access for read and write access to "internal_data" folder
That was it! Updated to the latest [AL] Core Package and the flags are displaying again :) Many thanks @Painbaker
 
Top Bottom