I installed and checked off the redirect option, but of course I'm now in an endless redirect back to the top level of the domain (therefore cannot modify the module). I can delete the module, and all is well, but if you reinstall the module, the same redirect appears.
How do you get to its settings and delete them? Thanks.
Comments
Comment #1
waverate commentedTo get back to the way things were, I would delete the module and UNINSTALL it from the module page. That way when you install it again, there will not be any saved information.
Are you using the same domain for Mobile and Desktop URL or are you using m.domain.com for the Mobile URL?
If you are using different domains, then under Theme Switcher, you can select Switch theme based on the URL.
Comment #2
twom commentedHi iomatic,
Any progress with your problem? I would like to figure out why this loop occured. Can you give us the path's you are using (you can use fictive domain names ;)).
Comment #3
jaarong commentedI am having this same exact issue. I have to delete the folder to get my site back, but I cannot uninstall on the modules page, that option isn't available. This happened when I checked automatic redirection. I have a desktop site which is www.site.com and a mobile site which is m.site.com. Both of these values were plugged in correctly. I simply need redirection to the mobile site when visitors come to my home page with a mobile browser (and no other page).
Comment #4
Crom commentedsubscribing - same problem. I am wanting to theme switch on the same domain.
Comment #5
larynI just updated to 6.x-2.1 to try to get the 'nomobile' switch to work. The mobile version is working fine except this switch is not functioning correctly. If I add '?nomobile=true' in the mobile browser I get sent into a redirect loop from m.domain.org to www.domain.org over and over until it errors out. Any ideas?
Comment #6
twom commentedHi,
Thx for the error report. I'll look at the redirection loop.
In meantime can you checkout the new documentation? http://drupal.org/node/459686
The use of nomobile has become depricated, since it is not flexible enough and it got some developers confused.
Currently you better do:
device=desktop
device=mobile
device=[device-group]
device=auto
Let me know if this works for you!
Comment #7
novakov commentedhad the same problem, and just deleting module folder didn`t wake up my site back online, so i deleted tables in DB. and after reinstalling the module bad redirection starts to work again.
just to deactivate the module and uninstall it i couldn`t because bad redirection worked fine))
so the only solution i found is in the next actions:
go to your database and in table "system" edit the table which contains filename "sites/all/modules/mobile_tools/mobile_tools.module" - set status to "0" (insteed of "1"). now the module is deactivated, so the old bad redirection isnt working now and you can go to http://domain/admin/build/modules/uninstall and uninstall the module in a wright way. after this you can activate module again and configure good redirections for your site
hope it will help you, like it helped me, because module is realy good one
Comment #8
haleagar commentedThis appears to be a common condition.
If you are using two domains m.example.com and example.com along with automatic redirection, and links to allow the user to override the redirection.
Using the provided overide links in the default block seems to work 95% of the time, but if you manually enter one of the overrides, you can easily find yourself in a redirect loop: like say
m.example.com/?device=auto
example.com/?device=mobile
or
m.example.com/?device=desktop
example.com/?device=mobile
You can fix this by clearing your cookies for both domains, or by sending the same overide to both domains
m.example.com/?device=desktop
example.com/?device=desktop
However I think the real solution is to eliminate the ability to get into a redirect loop, or rather to break out of the redirect loop if it occurs.
The way to do that seems to be to is to change the mobile_tools_device_redirect code so that it sets the cookie on the current domain before sending the redirect that includes the ?device= value
So that on any redirect both sides will be set to the same value.
Comment #9
jasonglisson commentedI've been working on this issue all day long. Actually....for a few days now and I finally arrived at a solution. I was getting the white screen and stuff as well.
First off, I need to say that this module (Mobile Tools) is amazing and very useful.
However, I've had so many problems with it, that I nearly just gave up.
Ok, so... I was having this redirect issue with all installs from 6.x-2.1 all the way to 6.x-2.3. I had gotten it to work reasonably well with 6.x-2.1, but only using the redirect with URL. I really wanted it to redirect on device.
So I did some searching. I tried WURFL and that was a pain. No doubt it is a great module, but it's very involved and I could never get it to work properly.
Then I found this site: http://www.mattyoung.com.au/automatic-mobile-device-detection-drupal#navigation
It requires creating a PHP file named "checkmobile.php" and altering your settings.php file. Since I don't plan to have a multisite, I dropped the checkmobile.php file into the same root directory instead of the one Matt suggest on his website. He also forgot to inclose the checkmobile.php script in php tags, so don't forget that.
The trick for me was to use mobile tools to detect the device based on the URL and NOT the actual device. Mobile tools was trying to redirect over and over.
Use this guys script and php file to do the device detection, and use mobile tools to change the theme.
Let me know if that works for you.
Comment #10
bcobin commentedThanks for the tip @tk421jag - I've been trying to get MT to work, too - and I think I almost have it, but the device detection seems wonky.
The Matt Young snippet for settings.php is for Drupal 5 and doesn't work for D6 - would you mind sharing whet you did here? Thanks much!
Comment #11
jasonglisson commentedWell.....after I played around with this all afternoon yesterday, I found ONE problem. I couldn't get my blackberry to redirect to the mobile site. It would continuously give me the redirect error. Most would probably say "Who cares about Blackberry?"
The issue is that a lot of people still carry them, including every single person in my company. So it's a MUST.
Since the Matt Young script really isn't using anything in Drupal, I decided to try it. He is using all php script that has nothing to do with any version of Drupal. So it does work with a Drupal 6 site, which is what I'm running.
The issue is now that Mobile Tools is still trying to redirect somehow. I can turn Mobile Tools off and all devices will goto the mobile domain perfectly. Then the issue becomes switching to the mobile theme. I've tried everything I can find in the way of modules (ThemeKey, Subdomain) but neither of them allow this.
Outside of Mobile Tools, do you know anyway to change the theme per subdomain? It's not a separate install. Same server. Same IP. Different domain. I can't figure it out.
Comment #12
jasonglisson commentedI just removed the Mat Young script and I'm using Mobile tools to switch the theme per URL. I think Device Detection is totally out. I can't get it to work properly across multiple devices, including my tablets.
Comment #13
bcobin commentedOh - agreed that Blackberry is a must. Actually, pretty much everything is, mobile or not - I still lose a lot of time getting sites to work in IE 6 and 7.
It's not clear what version you're using - it sounds like you're using 2.1, which I've probably had the best luck with so far. My problem with 2.1 is that the alternate front page didn't work properly, so I've gone back to square one and am currently working with a heavily patched version of 2.3 on my development server, where I have local.domain.com and local.m.domain.com set up to redirect locally.
Redirection is currently proving somewhat troublesome with iPhoney (which is the only way to test it locally, if you think about it), but I'm hoping to have a "recipe" soon - perhaps even later today. Forget about WURFL - it's turned into a commercial (and fairly expensive) service, if I read the posts properly.
I'd still be curious as to how you got the Matt Young D5 snippet to work in D6 - I get WSOD.
Gotta solve this thing!
Update: I did manage to get things to work, apparently - but with one problem: the full site link shows the mobile front page. So there's no way for the mobile user to see the full front page of the site. No good.
Oh well... it's not like mobile is important or anything; I'm sure it's just a passing fad. Not! Arrrgh.., it sure would be nice to get this working! Any ideas greatly appreciated!
Comment #14
bdornbush commentedI got Wurlf working for Android, which is the only portable device I have to test, with a lot of effort (http://drupal.org/node/897262#comment-5205718), but I still have the redirection problem. I set the redirection cookie lifetime to 60 seconds, so the redirection loop doesn't last too long, good for testing but not good enough for production. Deleting the cookie also works to break out of the loop if yours is set for longer.
Is this really a support request, or is there a bug here?
Comment #15
ckngGetting the same on D7, a site
- with i18n dual languages, not based on path or subdomain, not configure to be http://d7.local/en, but somehow redirect there
- mobile tools with same domain, 2 themes (same theme as haven't configure)
- redirect loop even after disabled, uninstalled and deleted this module
- site totally inaccessible, thus setting to critical
Comment #16
ckngMy bad, after retracing all the changes, it turns out to be related to #1337132: Redirect loop after enabling second language and setting it to default.
Comment #17
minoroffense commented