rainlab/translate-plugin

alert popup window in ios (iphone to be precise)

DPTOProgramacionIslaNetworks opened this issue · 3 comments

Hi, i have this plugin , and when i try to change the language using a dropdown message selector on iphone
it shows a popup with the only text on the pop up being "error" and an accept button
but it doesnt happen always,

here is a image of the dropdown lang selector
image

and only happens in iphone, in mac, or windows or android, doesnt happen

i think this might be happening becose the plugin does not load properly some times on iphone , or it does not load faster enough on iphone so, for the time the user clicks on the change language dropdown, the js might not be loaded

i really hope someone can help me with this issue

thanks in advance

Hi @DPTOProgramacionIslaNetworks

This issue is not related to the translate plugin. When the "error" message is shown, it comes from the jQuery AJAX framework. It happens when the server responds with a non-successful response (not code 200) and has an empty payload. This is the specific logic:

// statusText is "error"
errorMsg = jqXHR.responseText ? jqXHR.responseText : jqXHR.statusText;

An empty payload is something PHP can do when an internal error occurs, but the message is suppressed by configuration for security reasons. In summary, for some reason, your server is returning an empty response for some requests. The underlying cause could be found in the server logs.

I hope this helps.

i tried to change the php config to disable the php error messages and still the same issue

Try using the Safari debug tools to get more information. Here's a link: https://www.browserstack.com/guide/how-to-debug-on-iphone