Support » Plugin: Geolocation IP Detection » Fatal error: Call to undefined method MaxMind

  • Resolved ars111

    (@ars111)


    Hello,

    New version 4.1.0. is causing big problems all the way with this plugin… Codes that are inserted on the site like:

    [geoip_detect2_show_if country=”FR”]Acheter[/geoip_detect2_show_if][geoip_detect2_show_if country=”DE”]Kaufen[/geoip_detect2_show_if][geoip_detect2_show_if not_country=”FR, DE”]Buy[/geoip_detect2_show_if]

    Is causing fatal error on particular page:
    `Fatal error: Uncaught Error: Call to undefined method MaxMind\Db\Reader::getWithPrefixLen() in …./wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php:246 Stack trace: #0 …./wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(217): GeoIp2\Database\Reader->getRecord(‘Country’, ‘Country’, ‘….’) #1 …./wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(90): GeoIp2\Database\Reader->modelFor(‘Country’, ‘Country’, ‘….’) #2 …./wp-content/plugins/geoip-detect/geoip-detect-lib.php(194): GeoIp2\Database\Reader->country(‘172.68.226.127’) #3 …./wp-content/plugins/geoip-detect/api.php(83): _geoip_detect2_get_record_from_reader(Object(GeoIp2\Database\Reader), ‘172.68.226.127’, ”) #4 …./public_html/me in …./wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php on line 246

    Why is this happening all the sudden? Can you assist me please how to fix this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Benjamin Pick

    (@benjamin4)

    This plugin appears when there is a different plugin that also uses the Maxmind library, but that plugin uses a different version of those. Which Plugin version did you use before? Does 3.3.0 / 4.0.0 work on your site?
    Which plugins that are installed on your site are capable of Maxmind Geodetection? WooCommerce, etc.

    Thread Starter ars111

    (@ars111)

    I’ve tried with this plugin version 4.0.1 and 4.1.0. but it gives me this error. Only plugin that is using Maxmind library is this one (I even don’t have Woocommerce since this is pure website not a webshop). Version 4.0.0 is also not working, while 3.3.0 version seems to be working (at least it does not give an error, but I don’t know if it gives back proper geolocation). What can I do here? Except leavign the 3.3.0. version?

    Plugin Author Benjamin Pick

    (@benjamin4)

    I am quite sure some other plugin also is using the Maxmind libraries, maybe for optional functionality that you don’t use. Can you search if any other plugin contains a file called “Reader.php” ?

    For now, I would suggest you keep using 3.3.0 – I will try to find a workaround and send you a beta, maybe at some point this week.

    Thread Starter ars111

    (@ars111)

    301 Redirects Pro
    Avada Builder
    Avada Core
    Business Reviews Bundle
    Geolocation IP Detection
    Gravity Forms
    Login No Captcha reCAPTCHA (Google)
    MailPoet 3 (New)
    MailPoet 3 Premium (New)
    Regenerate Thumbnails
    reSmush.it Image Optimizer
    Simple Google reCAPTCHA
    Smash Balloon Instagram Feed
    Tidio Chat
    WP Mail SMTP
    WP SEO Structured Data Schema
    WP Store Locator
    WP Video Popup PRO
    WPS Hide Login
    Yoast SEO

    This is a list of plugins that I’m using but none of them except GeoLocation plugin is using MaxMind libraries. Thank you in advance for that.

    Plugin Author Benjamin Pick

    (@benjamin4)

    I have now released a beta Version, can you please install it?
    https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing

    It doesn’t fix the problem, but it shows which other plugin there is the conflict with. After installing the beta, you should see an admin notice it about it, can you please copy for me the file path it shows?
    If the admin message does not show, you can go to Options > Client IP Debug Panel.

    Thread Starter ars111

    (@ars111)

    Hi Benjamin,

    True, it shows that 301 Redirects Pro is also using same database so I deleted it. Please, give me a couple of days to monitor this and then I’ll get back to you with results. Thanks a bunch for your generous help. I really do appreciate that.

    Thread Starter ars111

    (@ars111)

    Hi Benjamin,

    Thank you for your generous help. I really do appreciate it. Your plugin is the best and deserves a five star rating and a tip.

    Thanks a lot.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.