Hello,

This module works only for registered users (without Drupal cache). Is there a solution to this problem?

Thank you in advance!

Comments

quiptime’s picture

Status: Active » Postponed (maintainer needs more info)
  • Is the mobile theme "jQuery mobile" based?
  • The problem occurred after change settings in the Mobile Switch module configuration?

To check still exist the problem, please use the dev release.
The dev release contains a fix to solve problems if caching enabled. The fix insert cache-clear-actions, which associated with changes in the module configuration.

Please give feedback whether the problem is solved with the fix in the dev release.

Thanks for your report.

Clément’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev

I realized after beating the module does not work.
I am the wrong module.

I installed the dev version. and configured my mobile theme here: admin/config/user-interface/mobile-switch

The theme is: http://drupal.org/project/mobile_jquery

The cache is currently disabled

When I visit the site with Android version 4, the theme does not change.

I also tested this way ("mobile OK" is displayed):

function mobile_switch_boot() {
  
  ...

  if ($get['browser']['ismobiledevice'] == 1 || ($get['browser']['ismobiledevice'] == 0 && $get['developer'] == 1 && $get['deskbrowser'] == 1) || $get['deskbrowser'] == 1) {
    $conf['theme_default'] = $conf['theme_mobile'] = variable_get('mobile_switch_mobile_theme', $get['default_theme']);
    $conf['mobile_switch_ismobiletheme'] = TRUE;
    
    echo 'mobile OK<br />';
  }
  
  ...
}
quiptime’s picture

I realized after beating the module does not work.
I am the wrong module.

I do not understand what you're saying herewith. (Poste Deutsch wenn Dir die Worte fehlen.)

 

I also tested this way ("mobile OK" is displayed):

"mobile OK" is displayed or not?

Clément’s picture

Sorry, I think that Google Translation misunderstood. (I speak French)

I tested "mobile theme" and not "mobile switch"

With this module, the theme does not change for me (with or without the cache enabled).

quiptime’s picture

With this module, the theme does not change for me (with or without the cache enabled).

Other modules make a proper switch to a mobile theme?

Mobile Switch - Developer modus

Note, you can use the development features of the Mobile Switch module.
To make this in use, activate the setting Developer modus of the Mobile Switch module.

  • It is possible to display the useragent string of your mobile device.
  • You can configure a part from the useragent string to force (test) the detection of your mobile device.

 

You can use a Mobile Switch module function to check the detection of your mobile device.

Mobile Switch code to check (Android) extended useragent strings:

$browser = mobile_switch_browscap_get_browser(TRUE);
if ($browser['ismobiledevice'] == 1) {
  print 'Mobile Switch: Is mobile device.';
}

Browcap

Furthermore, you can use a Browcap module function to check the detection of your mobile device.

Browscap code to use:

$browser = browscap_get_browser(NULL, TRUE);
if ($browser['ismobiledevice'] == 1) {
  print 'Browscap: Is mobile device.';
}

Tip

Use the Devel module and their Execute PHP code feature to use the code above on the fly in your desktop browser.

Clément’s picture

Yes: http://drupal.org/project/mobile_theme (but, It does not work when cache is enabled).

The detection works well but the theme does not change.
I tested the tool for development, but the theme does not change either.

quiptime’s picture

At the moment, i can not reproduce the problem.

You say, you use the Mobile jQuery Theme.

  • If you are configured a proper subtheme for the Mobile jQuery main theme?
  • If you are tested the proper display of your subtheme?

You can work with the development features of Mobile Switch (MSw) and use the Desktop browser feature.
This makes it possible to display the mobile theme on your desktop browser.

Please test the desktop browser display of the mobile theme and give me feedback.

Known limitation

In principle, the MSw module will work with the cache enabled.

A MSw module configuration change make problems if caching enabled. The changes are not displayed without cache clearing.

This problem is fixed in the dev release of Mobile Switch (MSw).

The Limitation:

A jQuery mobile based theme (as example Mobile jQuery Theme) causes problems for a change of MSw module settings.
These problems are visible when activated a MSw setting for the jQuery mobile based mobile theme, and if this setting is changed.

  • The problem here is the browser cache (and jQuery mobile).

A (server-side) cache clearing can not solve display problems.

You can test the jQuery mobile caching problem. Use as mobile theme another theme, as example Picture Reloaded.
Then make changes to MSw (use the dev release), with cache enabled - no display problems after setting changes.

Clément’s picture

I found a solution!

(with module : mobile theme)

quiptime’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
imonemus’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (works as designed) » Active

Sorry to reopen, but I think this is still a problem.

I am using 7.x-2.0-alpha1+2-dev with Mobile Theme (NOT Mobile jQuery Theme) and caching is enabled.

When I clear the cache and first view the site on desktop, I see only the desktop version when I subsequently view on a mobile; when I clear the cache and first view on a mobile, I see only the mobile version when I subsequently view the site on a desktop. The pages are clearly being served out of the cache as they were for the first device type that caused them to be generated.

On the other hand, this is so major that it is odd that everyone isn't complaining about it, so I am willing to assume I am doing something wrong or missing another issue.

Can anyone else reproduce this?

quiptime’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Please do not switch the release version!

Create a new issue with the version 7.x-2.x-dev.

imonemus’s picture

Why not? The problem wasn't fixed and was carried over to a new version.

imonemus’s picture

Frank HH-germany’s picture

Issue summary: View changes

Hallo quiptime,

es ist für mich als Fremdsprachenlegastheniker erfreuclich zu lesen, dass ich auch auf deutsch fragen kann.

Ich schaffe es iregndwie nicht den Theme Switch herzustellen.
Ich nutze AT Commerce auf Commerce Kickstart. Die Desktopversion ist mit aktiviertem Cach gut schnell.
(Ich habe natürlich beim rumprobieren auch alles mögliche deaktiviert)
Als Detect Module habe ich Browscap und, oder Mobile Detect. (Das ausblenden von Blöcken auf dem Mobile funktioniert leider auch nur richtig wenn der Cache deaktiviert ist)
Von dem AT Commerce habe ich nach Anleitung ein "Mobisub" erstellt.
Auch das CK Omega Sub-Theme wird nicht angesteuert.
Meine Seite www dot tecmawi dot eu.

Woran kann das liegen?
Was mache ich verkehrt?

Gruß Frank

PS: Ich werde den Cache und Adv css/js Agregation ersmal wieder aktivieren.

MakeOnlineShop’s picture

Hello,

Can you confirm that the solution is reliable and stable ?

Thank you.