Not recognized Chrome version is getting blocked
-
Hi,
I had an issue with the following Chrome user agent:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36
For some reason the browscap is unable to tell report the version of Chrome:
[browser_name] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36 [browser_name_regex] => ^mozilla/5\.0 \(.*windows nt (\d)\.(\d).*\) applewebkit/.* \(khtml, like gecko\).*chrome/.*safari/.*$ [browser_name_pattern] => Mozilla/5.0 (*Windows NT 6.1*) AppleWebKit/* (KHTML, like Gecko)*Chrome/*Safari/* [Parent] => Chrome Generic [Platform] => Win7 [Platform_Version] => 6.1 [Win32] => 1 [Browser] => Chrome [Frames] => 1 [IFrames] => 1 [Tables] => 1 [Cookies] => 1 [JavaScript] => 1 [JavaApplets] => 1 [CssVersion] => 1 [Comment] => DefaultProperties [Version] => 0.0 [MajorVer] => 0 [MinorVer] => 0 [Alpha] => [Beta] => [Win16] => [Win64] => [BackgroundSounds] => [VBScript] => [ActiveXControls] => [isMobileDevice] => [isTablet] => [isSyndicationReader] => [Crawler] => [AolVersion] => 0
I tried updating the browscap.ini and cache but it didn’t solve.
This causes the plugin to show the unsupported browser message even though I set not to block Chrome browsers.
The issue arises from the ‘Do not block’ setting value which is 0 and matches the not recognized browser version (also 0).
The result is that Chrome is blocked even though I set the plugin not to block Chrome.
I made a change to the settings screen in order to provide an additional option, ‘Block unrecognized versions’ (using value 0) and changing ‘Do not block’ to use value -1.
This way works fine.
I published the updated settings file code here, you can see the change around line 125:
https://gist.github.com/ziodave/652b898137db6096b8e4I would be glad if you could merge the changes to your source code so that we keep updating from the WordPress Plugins web site.
Thanks for your plugin,
David
- The topic ‘Not recognized Chrome version is getting blocked’ is closed to new replies.