[OzzModz] Login By Country Log

[OzzModz] Login By Country Log 2.1.0 Patch Level 3

No permission to download
@Ozzy47 I just updated @digitalpoint's Cloudflare addon to 1.5.1 and I'm getting these errors in the console when trying to modify a phrase. The phrase does not save, and there is no error logged in the XF error log. Front end displayed the "Oops! We ran into some problems" message.

Code:
PHP: <br />
<b>Fatal error</b>: Declaration of OzzModz\CountryLogin\XF\FsMounts::loadDefaultMounts(array $config) must be compatible with DigitalPoint\Cloudflare\XF\FsMounts::loadDefaultMounts(array $config, $allowAdaptersNotInConfig = true) in <b>/home/nginx/domains/domain.com/public/xenforo/src/addons/OzzModz/CountryLogin/XF/FsMounts.php</b> on line <b>10</b><br />
core-compiled.js:43:78
    defaultAjaxError https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:43
    l https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:39
    jQuery 6
        c
        fireWith
        l
        o
        (Async: EventHandlerNonNull)
    send
        ajax
    ajax https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:41
    submit https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:235
    (Async: setTimeout handler)
    submit https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:235
    proxy https://domain.com/xenforo/js/xf/core-compiled.js?_v=5d9b041b:73
    jQuery 2
        dispatch
        handle

Trying to disable this addon, I get this error.

Code:
Fatal error: Declaration of OzzModz\CountryLogin\XF\FsMounts::loadDefaultMounts(array $config) must be compatible with DigitalPoint\Cloudflare\XF\FsMounts::loadDefaultMounts(array $config, $allowAdaptersNotInConfig = true) in /home/nginx/domains/domain.com/public/xenforo/src/addons/OzzModz/CountryLogin/XF/FsMounts.php on line 10

Trying to disable the Cloudflare addon works.
The quick fix is to go to OzzModz/CountryLogin/XF/FsMounts.php change this:
PHP:
public static function loadDefaultMounts(array $config)

to this:
PHP:
public static function loadDefaultMounts(array $config, $allowAdaptersNotInConfig = true)

That will at least get you going for now. In the meantime, I'm going to see if there might be a more compatible way to do what I'm doing (it might be as simple as raising the execution order of my class extension to something really high).
 
Needs an update for XF 2.2.13

Code:
Server error log
[LIST]
[*]InvalidArgumentException: Accessed unknown getter 'ozzmodz_cl_watch' on XF:User[79317]
[*]src/XF/Mvc/Entity/Entity.php:213
[*]Generated by: jsmo
[*]May 19, 2023 at 7:05 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('ozzmodz_cl_watc...')
#1 src/addons/OzzModz/CountryLogin/XF/Entity/User.php(21): XF\Mvc\Entity\Entity->__get('ozzmodz_cl_watc...')
#2 src/addons/OzzModz/CountryLogin/Service/Checker.php(71): OzzModz\CountryLogin\XF\Entity\User->isCountryLoginWatched()
#3 src/addons/OzzModz/CountryLogin/Listener.php(38): OzzModz\CountryLogin\Service\Checker->logIfWatched()
#4 src/XF.php(377): OzzModz\CountryLogin\Listener::OzzModz\CountryLogin\{closure}()
#5 src/XF/Mvc/Dispatcher.php(158): XF::triggerRunOnce(true)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(21) "/index.php?sw/offline"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["sw/offline"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Top Bottom