Search
Other GeoIp questions
Forum

GeoIP/Conditional Content no longer working after latest update

Jordan Fonseka's Avatar Jordan Fonseka
I use GeoIP in conjunction with Conditional Content to display phone numbers based on the users IP. I show content specific to the USA, to Australia and, if the user IP doesn't match either of these, then the site falls back to a direct dial international number.

This was previously working however an update to regular labs plugins yesterdat seems to have been the trigger for this to stop functioning correctly.

My site now always displays the international contact details in all circumstances. I have tested multiple IP's using proxies and real devices with unique IPs.

I have taken those testing IP numbers from my webserver access logs and run them through www.maxmind.com/en/geoip-web-services-demo , which I understand is the basis of the geolocation data from the geoIP plugin. Maxmind correctly lists the IP locations. Are there any known issues with the latest geoIP or conditional content plugins? Or any advice on how I can debug this on site to try and understand if the issue is with a regular labs extension or something specific to my site?

Joomla 4.4.0
GeoIP (Free) 6.0.4
Conditional Content (Paid) 5.1.5PRO
Peter van Westen's Avatar Peter van Westen ADMIN
Are you using Conditional Content for this? Or custom php code using the GeoIP library?
Please post a rating at the Joomla! Extensions Directory
Jordan Fonseka's Avatar Jordan Fonseka
I'm using Conditional Content version 5.1.5PRO.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Jordan Fonseka's Avatar Jordan Fonseka
I'm sorry, unfortunately I'm not going to be able to do that.
I can give you a url, although I'm not sure that will be much help.
Confidential information:
(hidden)


I understand if this prevents you from going any further with this. Is there any local logging option from geoIP or Conditional Content that I might be able to use? Thank you.
Peter van Westen's Avatar Peter van Westen ADMIN
Indeed, I can't do much with just an url.

When debug mode is on, you can find a regularlabs_geoip.log.php file in your logs folder.
Please post a rating at the Joomla! Extensions Directory
Jordan Fonseka's Avatar Jordan Fonseka
Understood. For your information the debug logs did not show anything unusual and all IP's listed had their location correctly identified.

As a temporary solution I rolled the GEOIP plugin back to version 6.0.2 and the location specific content is working correctly again.
Peter van Westen's Avatar Peter van Westen ADMIN
If you can, try to reproduce the issue on an online environment to which I can get access.
Also see if deleting the entire /libraries/geoip folder and reinstalling it helps.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
I found the underlying issue.

Please try the latest development version of GeoIP from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Calvin's Avatar Calvin
I was going to post a new message about this same topic, but am adding to this existing message instead. If you want this to be a new message thread, please let me know.

I downloaded and installed the beta GeoIP plugin and it does seem to fix the Inline code (from my limited testing). However, it doesn't seem to fix when I choose modules to be displayed/hidden by GeoIP.

I am testing everything on a development site, and have created access for you. I'll give you the login information confidentially.

The normal page I'm working on is the donate page. We have UK, Canada, and US/World entities, and each have their own donation information and form. Until recently, the GeoIP with Conditional Content allowed me to display text, forms, links, flags, and sidebar content as appropriate.

Your recent update seems to have broken this setup.

To assist you with finding the articles and modules on the back end of the site, I'm working on the article "GeoIP TEST". There are two INLINE Conditional Content lines in this article that seem to work with the BETA plugin. However, I'm also embedding two modules which do not seem to be working. You can find these modules by filtering on TEST.

I don't know if I am creating the CONDITIONS correctly on the modules, or embedding them in a way that works properly with GeoIP conditions.

Please take a look and let me know what needs to be done to correct the issue.

Note: I'm using a VM running a VPN to simulate being in the UK, Canada, and elsewhere. There seems to be a delay in when the GeoIP matches a new location. I'm using whatsmyip.com to confirm my IP location, but the Conditional Content doesn't change right away. Is this due to some level of caching? Is there something I can do to make it faster to update?

Thanks!

Calvin

Joomla 5.0.3
MariaDB 10
PHP 8.2

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
In the Modules Anywhere system plugin settings, switch off the "Ignore Module Conditions" option.
Please post a rating at the Joomla! Extensions Directory
Calvin's Avatar Calvin
That was simple enough. Thanks!

Did that default to "on" or did I accidentally enable it sometime in the past? I was trying all kinds of things to get the embed to work, so I don't remember what I did.

There appears to be a delay in detecting the GeoIP location to switch to the country. When I switch my VPN to a different location, it can take awhile for the display to change to reflect this.

In practice this won't make a difference as whoever is visiting isn't likely moving around fast enough to matter, but for testing purposes, is there something i can do in Joomla to make the detection faster? It doesn't seem to be a browser caching as I've cleared the Joomla and browser caches.

Thanks again.
Peter van Westen's Avatar Peter van Westen ADMIN
That would indeed be down to cache. I don't think there is much you can do about it.
Please post a rating at the Joomla! Extensions Directory
Calvin's Avatar Calvin
Is there a way to use the GeoIP extension to make Joomla menu links go to different destinations depending on where the person is located?
Peter van Westen's Avatar Peter van Westen ADMIN
I have no extension to control menu items.

You could potentially use ReReplacer to replace the urls in the html output with others, based on the Geo Location conditions.
Please post a rating at the Joomla! Extensions Directory
Calvin's Avatar Calvin
I was thinking Rereplacer might work. I could put a unique fake URL on the menu item, then use Rereplace to replace with the correct one based on conditions.

Thank you again for your help. It took me awhile to figure out Conditions when you first introduced them for Joomla 4, but now I can't live without them. 🙂
You can only post on this forum if you log in