Thanks for the great module! It seems like this would be the perfect fit to the site I'm working on, except for one problem.. the frontpage for mobile is not working. What I did:
- I created a view with only news items (title plus image), included a Page display and the url 'mobile'
- On the Mobile Tools page, I've set the mobile frontpage to 'mobile'
- When I visit the frontpage from my desktop, I see the normal frontpage
- When I visit the frontpage from my mobile, I get redirected to m.mydomain.com with the mobile theme.
So far so good, except for the fact that the frontpage on the mobile version is not displaying the content from /mobile, but from /node. Even if I enter the path m.mydomain.com/mobile manually, I still see the default teaser view (ten promoted teasers) instead of my custom view. So I opened the page.tpl.php from the themes folder and printed arg(0), which returned 'node' instead of 'mobile'.
The weirdest thing is, is that www.mydomain.com/mobile returns the correct view, while m.mydomain.com/mobile doesn't.
Any ideas? I tried 2.3, 2.2 and 2.x-dev, no luck with any of them.
Comment | File | Size | Author |
---|---|---|---|
#25 | mobile_tools.patch | 791 bytes | andrewsuth |
Comments
Comment #1
BarisW CreditAttribution: BarisW commentedSeems to be the same problem as http://drupal.org/node/1101560#comment-4530834
Comment #2
bcobin CreditAttribution: bcobin commentedYes - although this description is more succinct and describes precisely what I'm experiencing, without the domain issues discussed in the other thread.
Has anyone found a solution for this? The mobile view used to work; now I've had to disable Mobile Tools until this is resolved. Bummer. (Otherwise, terrific module - thanks, Twom!)
Comment #3
bcobin CreditAttribution: bcobin commentedBumping this - the front page view definitely worked at some point; I would be happy to fall back to the earlier version and forego the "latest and greatest" code just to get it working again. It looks like much of the activity has been on the D7 branch, but it sure would be nice to have the alternate front page working once more in D6.
I have MT installed (although not exposed) on a deployed site with domain switching (deactivated), so Thom, please feel free to reach out to me if you want to poke around. Thanks much!
Comment #4
BarisW CreditAttribution: BarisW commented@twom: any idea what's causing this? And more important: how to fix this?
Thanks a lot!
Comment #5
Toktik CreditAttribution: Toktik commentedI have same problem. But one clarification.
Are your default frontpage(desktop) is /node? Mine is Views based frontpage.
Actually I'm getting desktop version's frontpage in mobile version. Doesn't matter it's /node or views based or something else.
Comment #6
Toktik CreditAttribution: Toktik commentedActually this is critical, because we can't continue mobile version development without fixing this.
Comment #7
jboeger CreditAttribution: jboeger commentedsubscribing!
Comment #8
smithcrew4 CreditAttribution: smithcrew4 commentedsubscribing!
Comment #9
Jens Peter CreditAttribution: Jens Peter commentedI have a similar issue but my front page is showing correct until I try to get back to it. I wrote about it here: http://drupal.org/node/703708
But as it is similar I thought I would link to this one as well. Hope this is the correct way of doing it.
Comment #10
DoktorNo CreditAttribution: DoktorNo commentedSubscribing! I had replicated this error on my setup (version 6.x-2.3).
Comment #11
BarisW CreditAttribution: BarisW commented@twom: any change to look into this issue?
Comment #12
bcobin CreditAttribution: bcobin commentedBumping this again - this is really a show-stopper. Frustrating thing is that it used to work at one point. Any ideas? Thanks... standing by!
Comment #13
bcobin CreditAttribution: bcobin commentedBeen stuck here on mobile development now for several months; I'm starting in on a new project this week where the client will not be so understanding when it comes to mobile.
I don't know where Tom went - it's now been three months since there have been any code updates and that's pretty scary, especially with a problem of this magnitude. It's a particular shame in that this functionality did, indeed, work at some point.
To refresh, I'm using /frontpage for the site and a derivative of the /frontpage view for mobile (/mobile) that displays titles only. Redirection seems fine, but the mobile site displays the full node. I fear I'll have to look into using ThemeKey or something - this is a major drag.
Tom - hope all is well with you! Anybody else: any ideas? Would a bounty help? :-(
Comment #14
BarisW CreditAttribution: BarisW commentedI've created a page view '/mobile' to load for the mobile view. I've set both the default frontpage and the mobile front page to /mobile. This worked for me, it might help you as well?
Comment #15
bcobin CreditAttribution: bcobin commentedThanks for your input, BarisW, but the whole point is to have one front page for regular users and different one for mobile. We're happy with the /frontpage view (which is what the site is using); the whole problem is that the /mobile view doesn't work. I need front-page-promoted titles only, not the teaser, which is what the /frontpage view generates.
Most frustrating is that I had a back and forth with Thom at one point and it was working - it's since been "broken" somehow. *sigh*
Thanks anyway...
Comment #16
BarisW CreditAttribution: BarisW commentedI know your problem, but still.. did you try my suggestion?
Setting both the front_page urls to the mobile one? I did and somehow it worked (it only uses the /mobile view if I set the default view to /mobile as well).
Anyhow, I full agree with you that its quite frustrating that it stopped working as it should be.
Comment #17
bcobin CreditAttribution: bcobin commented@BarisW,
I set the default view to "mobile" and indeed, the front page for non-mobile uses showed the mobile view, not frontpage. Great for mobile users, I suppose - not so great for everybody else. So no luck there.
(Even if it did work, that is so majorly wrong I don't know if I could deal with it.)
Thanks for caring, really. Effectively, this means that MT as it currently exists is a dead end for mobile development until this gets fixed.
I think I am going to cry now... :-(
Thanks anyway...
Comment #18
jeremyasmith CreditAttribution: jeremyasmith commentedI have a similar problem (I think), My site will switch to m. url but will display the default theme (garland) instead of the mobile theme (mobile garland). However I notice that if I log on and go to any administration page it switches themes correctly to the mobile theme, but when I go back to a 'normal' page (still logged on) it goes back to garland?
Comment #19
bcobin CreditAttribution: bcobin commentedI think I've managed to work around the bug by using Apache mod_rewrite to redirect mobile visitors to the actual front page I want.
MT seems to "swallow up" the mobile front page, so here's what I did:
1. Create desired mobile front page in Views.
2. Clone desired mobile front page view and give it a different name. For example, my mobile front page is "mobile" and the clone is named "mobilefront."
3. Set MT to read "mobile" view as front page.
4. Edit .htaccess as follows:
This seems to be working for me, so far. At least I can get moving; I hope this gets fixed soon, though... MT is otherwise terriffic...
Comment #20
bcobin CreditAttribution: bcobin commentedNever mind - I spoke too soon.
Yes - using mod_rewrite you can actually get the alternate front page for mobile, but the problem is there's then no way for the mobile user to see the full front page; it will always redirect.
So this isn't a solution.
Has anyone figured out how to make the mobile front page work in 6.x? (it used to at one point - really, it did.) Thanks...
Comment #21
DanielWashbrook CreditAttribution: DanielWashbrook commentedI'm using the same url with a different frontpage (view) for mobile users.
I just upgraded to 2.3 and the problem is still there. It seems the mobile_tools_boot() function calls this function:
mobile_tools_site_type()
to see if it's of type mobile and no matter what, it comes back as 'desktop'.
My solution is to compare the value of $mobile_tools_device['type'] instead. It looks like this:
on line 199 of mobile_tools.module
It worked great before, works great again. Is this a reasonable solution? Should I make a patch?
Daniel
Comment #22
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks Daniel, that worked for me (Drupal 7.12).
EDIT: I fortunately have to say that the problem came back when I enabled page cache for anonymous users.
Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #24
fitacamp12 CreditAttribution: fitacamp12 commentedHello to everybody!!
I have the same problem as all of you. I can not change the frontpage for the mobile view. As everybody I'm using the same url with a different frontpage (panel) for mobile users.
Of course I have set my new mobile frontpage at "Choose another frontpage for mobile visitors.:" as "mobile-frontpage".
I have tried Daniel's solution,
but my mobile still opens the desktop frontpage. It doesn't work for me.
At least now, when I try to open directly the mobile frontpage in my desktop broser,(http://www.mysite.es/mobile-frontpage) it links to the mobile frontpage, instead of the the desktop frontpage as it used to do before trying Daniel's solution.
I had 6.x-2.3 version installed, but I removed it and re-installed "6.x-2.x-dev" version trying again Daniel's solution but it still doesn't work.
Any idea to solve it?
Thanks in Advance..
Rafa.
Comment #25
andrewsuth CreditAttribution: andrewsuth commentedAttached is a patch which should fix this issue as well allowing different homepages to work for multilingual sites.
Patch is made against current 2.x-dev branch.
Comment #26
minorOffense CreditAttribution: minorOffense commentedI'll review this evening.
Comment #27
minorOffense CreditAttribution: minorOffense commentedAlright I've committed the changes in dev.
Give it a try and let me know.
Comment #28
Devin Carlson CreditAttribution: Devin Carlson commentedThis was fixed with #1036288: Alternate mobile front page view not working in dev.
Comment #29
blogers CreditAttribution: blogers commentedI have the same problem