Not entirely sure that I have this straight yet, too long without sleep :-)

I use same urls for mobile/desktop, and just theme switching.
I was having a problem where I'll be browsing around my site with the desktop theme with no problems, then I click a link to the frontpage (cleanurls, so just and it gave me the mobile theme. Clicking on "view full site" (which linked to worked fine, but if I then went again to the front page I still saw the mobile page.

Flushing all caches seemed to fix it but the problem came back shortly after. I experienced it both with logged in and anonymous sessions.

Digging around, I noticed an unused variable assignment - I know it shouldn't make any difference because the return value of an assignment is the value of the assignment, but after changing this my problem seemed to go away. Maybe I am just off my rocker and the problem will come back again, or maybe there's something to it (php might have optimised the assignment away because the asignee was never used? dunno).

Anyway, this is what I changed that made it work for me:

--- tmp/mobile_tools.module     2012-07-08 01:37:38.000000000 -0400
+++ mobile_tools/mobile_tools.module    2012-07-08 11:30:15.000000000 -0400
@@ -684,7 +684,7 @@
 function mobile_tools_get_redirect_url($destination_site) {
   include_once './includes/';
-  $destination_url = ($destination_site == 'mobile') ? variable_get('mobile_tools_mobile_url', '') :  $destination =  variable_get('mobile_tools_desktop_url', '');
+  $destination_url = ($destination_site == 'mobile') ? variable_get('mobile_tools_mobile_url', '') :  variable_get('mobile_tools_desktop_url', '');
   // collect query parameters
   if (drupal_is_front_page()) {
     return $destination_url;


minorOffense’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
Status: Active » Needs work

I'll make the change in dev this evening. I'll post here once it's done so you can test.

minorOffense’s picture

Status: Needs work » Needs review

Alright I've pushed the changes to dev.

Give it a try and let me know.