undefined function utf8_is_ascii when submitting form only on Internet Explorer

bubila 02 Dec, 2016
Hello there! I've suddenly got a strange problem that seems to came out of nowhere... This happens ONLY on Internet Explorer. When I submit any form on my website it generates this error: call to undefined function utf8_is_ascii in libraries/joomla/application/web.php - all other browsers (including microsoft edge) are ok.
The form works perfectly but when redirecting the error appears and I'm left with a blank page. Do you have any clue what might cause the error? All other functionalities on the website work correctly. Thanks!
Elisa
GreyHead 03 Dec, 2016
Hi Elisa,

That looks as if it comes from the old line 515 in the Joomla! web.php file. In my current installation that function has been replaced by a different function !StringHelper::is_ascii($url)
			// We have to use a JavaScript redirect here because MSIE doesn't play nice with utf-8 URLs.
			if (($this->client->engine == JApplicationWebClient::TRIDENT) && !StringHelper::is_ascii($url))
			{
				$html = '<html><head>';
				$html .= '<meta http-equiv="content-type" content="text/html; charset=' . $this->charSet . '" />';
				$html .= '<script>document.location.href=\'' . str_replace("'", "'", $url) . '\';</script>';
				$html .= '</head><body></body></html>';

				echo $html;

I've not seen this reported before so I suspect that it is specific to your site or URL structure.

Bob
bubila 03 Dec, 2016
Hi Bob, I've got the same exact code and that's why I do not understand how on earth Internet Explorer does not work properly😟
I really do not know where to find the answer, moreover the url is pretty simple bariairporrtransfer.com so no strange characters used and the redirect url is /reservation-sent.html.
By the way, thanks for your time and if you happen to have any idea where I might find some suggestion it would be really appreciated! Will surely get back to you in case I find a solution🙂
Have a nice week end
Elisa
bubila 05 Dec, 2016
1 Likes
Hi Bob, just in case someone else might encounter the same problem... I checked all permissions on the website, I had some issues with a few files, some were assigned to different proprietors, I fixed this too and then upgrade joomla to the latest version, the problem seems to be long gone now🙂
thanks as always for your help!
This topic is locked and no more replies can be posted.