Closed conover closed 13 years ago
The DeviceClassifier should only map iPads and Android tablets to compliant devices if the site variable TABLET_ENABLED is set to 0 (line 60). This setting exists for sites which do not want to provide a tablet-specific interface. If TABLET_ENABLED is not set or set to 1, the DeviceClassifier should not change the tablet pagetype.
I see your point about the check on line 60 of DeviceClassifier.php, I missed the exclamation point there.
Before that logic though, the JSON returned from the service in the detectDeviceExternal method for both the iPad and iPad 2 is:
supports_certificate = True pagetype = Webkit description = iPad platform = iphone
I guess the long and short of it is that the tablet templates and styles are never displayed even when TABLET_ENABLED is set to 1.
Which device detection system are you using?
You can check this by looking at the site.ini variable MOBI_SERVICE_USE_EXTERNAL. This variable is a boolean that determines whether you use the built-in database detection or a remote service. If MOBI_SERVICE_USE_EXTERNAL is set to 1 you should also check MOBI_SERVICE_URL to see which server you are pointed at.
We are using the external service and the URL it is pointing at is https://modolabs-device.appspot.com/api/.
We will be updating the external device detection to include updated values. It appears that we are still using values for an older version of the software. After we have made the changes, we will post the proper values (which will certainly involve at least an updated version value)
The updated version for the device detection is planned to be deployed to production tommorrow. In the mean time the there is a test version that is currently live, you will need to use the following config values to use the test version of the service.
MOBI_SERVICE_VERSION = 2 MOBI_SERVICE_URL = "https://modolabs-device-test.appspot.com/api/"
The external device detection at https://modolabs-device.appspot.com/api/ has been updated.
Also the kurogo code base default config for external device detection has been bumped up to MOBI_SERVICE_VERSION = 2
External device detection reports the iPad (version 1) as pagetype
Webkit
with platformiphone
. Is that by design? I would think it would return pagetypetablet
with platformipad
.Further, even if device detection reported the iPad as having pagetype
tablet
with platformipad
, lines 63-71 of DeviceClassifier.php seem to set it back to pagetypecompliant
with platformiphone
.I'm working on a tablet representation of our mobile site and I've been having to force force the device to get it to set pagetype to
tablet
.I'll see what device detection returns with an iPad 2 tomorrow.
Thanks for looking into the issue.