Geolocation plugin returns 'API ERROR' on homepage

  • Posts: 37
  • Thank you received: 1
11 years 1 month ago #128350

Hi team !

I have a serious issue :(

Not sure when exactly, but the Geolocation plug-in started at some point to return an error on the www.benedictecaillat.com homepage.
I did nothing particular on this website for around 10 months.

First, it took me 10 (ten!) hours to find what was causing the issue. Time really lost for nothing...
Anyway, now that I know that it comes from that plug-in (just disabling it solves the system message), I have tried many things:
- disabling the Gzip compression (have read on another post that it had interfere with that plugin in the past)
- checked my API key on ipinfodb.com/
- updated my info and the server IP (in case) on ipinfodb.com/
- remove some JQuery and other Google API calls stuff (you never know)...
- changed the settings in the plugin
- tried to use the 'Components checked' option in the plugin to limit the effect of the plugin...

Nothing works!
Except if I disable the plugin. But if I do that, things like the currency is not correct anymore in the shop (it doesn't switch to € for France, instead of the default £)...

Luckily, you can get rid of the warning in one click, and most of the time, you need to empty your browser cache & history once you saw it one time, if you want to see it again.

But I absolutely cannot let things like that anyway.

Help !!
Many thanks in advance,

D.

*** INFO ***
-- url of the page with the problem -- : www.benedictecaillat.com
-- HikaShop version -- : 2.2.2 (and the ones before)
-- Joomla version -- : 2.5.14 stable
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : ALL
-- Error-message(debug-mod must be tuned on) -- :
System message
cURL failed. Error: connect() timed out!API returned error:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #128426

Hi,

Your problem is not linked with HikaShop but with the API.
The plugin try to reach the server but it "times out". So :
- Your server have a firewall and can't connect to an external server (or this specific server)
- The external server is down
- The IP is wrong

The problem is resumed with some few word: cURL failed. Error: connect() timed out!
cURL is the library which allow to call an webpage on another server. And it failed due to a connect time out.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 1
11 years 1 month ago #128429

Hi,

I'd like it to be that simple.
But then how can you explain:
1) that I have NO issue with the other API connexions (Google font, Analytics...)
2) that when I disable the 'Set currency' on 'No' in your plugin, things work properly (except that Hikashop doesn't select the right currency...).

Especially the n°2 somehow means that there's an issue with the plugin and the API... I have read that they changed something about naming conventions on countries last year... Something like that?

Anyway, I'm afraid it is related to this API.
Your opinion, bearing in mind those news elements?

Thanks for your help

D

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #128438

Hi,

Google fond and Analytics are not something running in your server which ask him to connect to an external API server.
It is library loaded by the clients, no by your server. So it is very different.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 1
11 years 1 month ago #128439

OK, sure about those APIs.
Forget about them.

:(
Nothing explains the n°2 in my last post: why I can let your Plugin published and just disable the 'Set currency' by selecting 'No' to prevent this error to appear. This clearly indicates that the API is reached (the 2 others options in your Plugin are handled!).

:(
And a 3°) point: it was working with this exact configuration for more than 6 months... The OVH server is the same, nothing has changed!

I have tried plenty of things. i really don't see why this is happening now.
Many thanks in advance for your help

Cordialement,
D

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 1
11 years 1 month ago #128520

:( I really need some help here...
PLease check my previous post...

1) I've got this system error pop up on homepage
2) currency selection doesn't work anymore
3) website is very long to load

If I disable the Geolocation manager, no more error and website load lights peed.
But automatic currency selection is of course not working better.

Again, this was working very well before, on the same server, with the same config. It is NOT a question of server rights, the server is NOT down, and the IPinfoDB conf has been the same from the beginning, and was working fine!

Can't it be that the Plugin got old, and that IPinfoDB API has slightly changed (that's by the way what they claim on their website: www.ipinfodb.com/index.php ).

On top of that issue, is there another way than geolocation to automatize the currency selection?

I try zillion things, checked internet, your forums...
I need help.

Many thanks in advance,
D

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #128547

Hi,

1) I've got this system error pop up on homepage
2) currency selection doesn't work anymore
3) website is very long to load

1) Because your server can't connect to the external server API.
2) Because your server can't connect to the external server API.
3) Because your server try to connect to the external server API but have a connection time out. This time out delay makes the page loading very long.

But automatic currency selection is of course not working better.

Yes, because you don't call the external server API to get the geolocation of the user and determine his currency.

As I said before, we didn't modify anything in the geolocation plugin (no modification since October 2012, for the J3 compatibility, four lines added) and the plugin works just fine.
So, it is not a problem related to an HikaShop update.
I will repeat myself : Please check your server.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 1
11 years 1 month ago #128551

If that was so, why can I let your Plugin published and just disable the 'Set currency' by selecting 'No' to prevent this error to appear???
This clearly indicates that the API is reached (the 2 others options in your Plugin are handled!).

So your advice is not relevant:
my server (OVH mutualisé ultra classique) is letting things happening.

Any other idea? You said that your plugin hasn't been modified since October 2012 while IPinfoDB mentions extensivly that they did change things in their API begining of 2013: Please be informed that on 1-Jan-2013 onwards, our API will return the United Kingdom country code as "GB" instead of "UK", to fully comply with ISO-3166 standard.

Weird enough, my website tries to handle GB currency...

So... Any other idea?

Thanks in advance

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #128572

Hi,

If you can't connect to the ipinfodb API, if you can't just reach the server or communicate with him, you can't have any kind of GB/UK problem because you can't even talk with the server.

The error message you got is the description of your problem.
I am sorry but I have already give you the answer and regarding the error message, the problem is not in our side.

I have no problem to call the ipinfodb API
api.ipinfodb.com/v3/ip-country/?ip=192.187.109.60&format=json

From:
- My place
- My OVH server
- The HikaShop server (hosted by OVH too)

You are asking for a solution and the only thing I can tell you is that the error message tell that it's a problem with CURL and the connection between your server and the "api.ipinfodb.com" server.

Since a long time, we have a patch in HikaShop

		if(!empty($location->countryCode) && $location->countryCode =='UK'){
			$location->countryCode='GB';
		}
which translate UK to GB (because we use GB in HikaShop). So if the API returns GB instead of UK, it's not a problem at all.

There is no option handled by the plugin at all. The three features are using the same API and there is only one call to the API server to get the location (city and country). Using the country HikaShop use the right currency (associated to the country, in his database).

Because you have a problem for the connection with the API, nothing can work. That's a fact and we can't modify anything in HikaShop to make it work, because it's not relevant to HikaShop.

I am sorry but you have to accept that the answer that I gave you is the real answer.
The message that CURL return you is your problem, you have to trust this message and investigate in this direction.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum