Leuchtfeuer / locate

The users country and preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. New functionality can be added easily.
https://www.Leuchtfeuer.com
GNU General Public License v2.0
9 stars 14 forks source link

Countrycode cannot be resolved to IPv6 #23

Closed derBoogie closed 2 years ago

derBoogie commented 3 years ago

Hi, I need the resolution of the client IP to the country for my extension. So I installed locate and used the function LocateUtility::getCountryIso2FromIP. Unfortunately, this does not return a country code for the client PI v6 (v4 works). So I debugged and found that the typecast to integer in function getNumericIp line 49 return (int)base_convert(ltrim($binNum, '0'), 2, 10); changes the decimal value so that it cannot be resolved in the database. If you omit the typecast, then it works.

TYPO3: v10.4.17 locate: v10.0.2

elbebass commented 3 years ago

This is already fixed in the current beta. I will take this into discussion, hope until then this will work out for you

elbebass commented 2 years ago

At the moment we do not have plans to release a version before moving the beta to a stable version. Sorry.

flossels commented 2 years ago

Hi,

IPv6 detection is already improved in the master of v10 (see: https://github.com/Leuchtfeuer/locate/commit/355b48c78f900b1c938997ede7c3c521c67ae29d). You can simply use this version or even better: A version 10.0.3 should be released :)