I have D6 [version 6.16] running over PHP 5.3 [XAMPP 1.7.3] with the Mobile Tools module installed to detect mobile devices. Other modules I've installed are AdminMenu, ShadowBox and WYSIWYG.
The issue I'm dealing is that my mobile/desktop site keeps displaying the mobile theme in Internet Explorer, with the Theme Switching option set to "Switch theme for a mobile device". However, Firefox, Chrome and Safari shows my desktop theme correctly, as my mobile theme [nokia mobile] in mobile devices.
Can anyone help me here?
PS: All browsers are well updated and don't have any plugin installed. I've tried already disabling all the extra modules but with no positive result.
Comments
Comment #1
xpound commentedComment #2
Alexolog commentedI have the same problem.
Comment #3
xpound commentedComment #4
xpound commentedComment #5
twom commentedHi,
If you are experiencing the problem, can you go to a site like http://whatsmyuseragent.com/ and copy paste your user agent string here?
Example: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.4; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; MS-RTC LM 8; .NET CLR 3.0.30729; .NET CLR 1.1.4322)
Comment #6
xpound commentedHi,
My current header sent by my browser [IE8] is:
HTTP_CONNECTION:keep-alive
HTTP_ACCEPT:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.3
HTTP_ACCEPT_ENCODING:gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE:pt-PT,pt;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_HOST:whatsmyuseragent.com
HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1045 Safari/532.5
Recently, I tried to access my local site from another computer on the web. In this case, I was using Windows XP Pro and I could see the website perfectly in IE8. Could it be anything around IE8/Win7?
Please let me know if you can find what's wrong.
Comment #7
twom commentedI don't see the problem yet, but I can say that this a strange user agent header for a IE8 browser :)
It looks like it want's to hide it's identity...
Comment #8
twom commentedI have tested this user agent with mobile tools, and everything seems to work fine...
A question, what happens if you go to http://wwW.osmobi.com or http://www.mobiledrupal.com? Are you being redirected?
Comment #9
xpound commentedFreaking Microsoft products! I can't believe... I'm being redirected to the mobile version of the websites [Osmobi and MobileDrupal] with IE8!
The problem is my browser...
And I have my O.S. the cleanest possible! May IE8 have any setting messing with the user agent output?
Should I reinstall my system?
Thanks in advance.
Comment #10
xpound commentedtwom, I can't say what made my IE8 UA turn like before.
However I've found a little tool capable of changing the User Agent on IE8 almost like the User Agent Switcher for Firefox, but in a permanent way. You can find it at http://www.enhanceie.com/ietoys/uapick.asp.
Maybe I'll delay reinstalling my system! ;)
Comment #11
twom commentedHi,
I'll discuss your problem with the people at http://www.osmobi.com. The same device detection mechanism is being used for Mobile Tools as at OSMOBI.com.
Hope to be able to fix this soon.
Tom
Comment #12
xpound commentedGlad to know.
I'm not a web developer yet so I didn't spend time watching Mobile Tools Code. However, I think that the theme switcher should always display the desktop theme as default behaviour and the mobile theme should only be displayed with a mobile device detection event. Maybe there's something happening on the UA/Device detection internal rules.
X.
Comment #13
thwohojr commentedI found this website that says the problem is in the scripting of the site... not your browser.
http://broadcast.oreilly.com/2009/12/ie8-64-bit-windows-7-and-the-m.html
Comment #14
eeriepanda commentedActually the problem is IE8 allows any program to modify the user agent. A recent issue I encountered was Creative Sound Suite adding Update to the User Agent. Obviously this is an issue and our fix was to remove PDA from detection.
---
An even better solution would be to determine why/what is using PDA as a user agent and use a more specific regex.
Comment #15
vincentdemers commentedIn my case the user agent in fault was
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; Creative AutoUpdate v1.40.02).It seems to happen with IE8 running under windows 7 64 bits...
I haxe fixed this by wrapping the switch(TRUE) in _mobile_tools_is_mobile_device() with if (!stristr($user_agent,'mozilla')) {
like this
Comment #16
random9q commentedMozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Media Center PC 5.0; SLCC1; Tablet PC 2.0; .NET4.0C; Creative AutoUpdate v1.40.01)
Glad someone commented that Creative Labs's addition of their update to the mobile string caused it to go bonkers.
I also notice looking at my user agent string that the addition of a Wacom pen tablet mutated it into a Tablet PC. Nice. This is my standard Win7-32bit laptop.
Any movement on addressing this semi-permanently, or should I attempt to hack the code roughly as described in the ad hoc patch above?
Thanks, and happy New Year's Day to all...
Comment #17
agrmarcasepatentes commentedAGR Assessoria em Registro de Marcas e Patentes. Pesquisa e registro de marca e patente, direito autoral, propriedade industrial e intelectual.
Comment #18
agrmarcasepatentes commentedAGR Assessoria em Registro de Marcas e Patentes. Pesquisa e registro de marca e patente, direito autoral, propriedade industrial e intelectual.
Comment #19
sterndata commentedsubscribe
Comment #20
sterndata commentedI've determined that my user's problem is due to the Creative AutoUpdate string. For the time being, I've just removed the string 'pda' from the test because I don't understand the above patch. What does testing for the absence of 'mozilla' do?
Comment #21
myared commentedInterestingly enough, this problem just happened to us today for the first time on a website that has been using Mobile Tools for several months. I refreshed the website cache and the correct theme is now being displayed again for IE8.
I believe that the problem is this:
99% of my IE8 people are fine. 1% may be using a version of IE8 that has had it's HTTP headers modified by another program. If that 1% hits the website and initiates the cache, then everyone sees the issue.
I'm going to be turning off the cache for the time being.
Any other ideas?
Comment #22
sterndata commentedFollowing another post upstream where it was pointed out that 'create update' triggered the test for 'pda', I removed that string from the test. OK, not the best approach, but it worked. I think that simply changing the test strings from things like 'pda' to ' pda ' might be helpful.
Comment #23
sterndata commentedThis could be fixed by changing "pda" in the user agent test to " pda". I have to remember to do that with each update!
Comment #24
minoroffense commentedThe 1.x branch is no longer supported. Closing.