Mobile template is not loading
We have an issue where a specific template won’t load correctly. Here’s a look at our template structure:
c
- index
core*
- index
mobile__c
- index
mobile__core
- index
core/index is our home page. This is loading the mobile template just fine. c is our category page. When we try to load /c/brushes, for example… the desktop version is getting served up. It’s not pulling from mobilec. If enter the URL as /mobilec/brushes, I'll get the mobile template. It seems like the extension isn't working.
Thoughts? We’re in a bit of a pinch here with this site to launch in pretty short order.
Using EE 2.3.1 and Mobile 0.8.7
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Wouter Vervloet on Feb 21, 2012 @ 10:42 PM
Do you have Freebie installed? If not, could you try it and set the "break on segment" to 'c'?
– Wouter
2 Posted by Dustin Hansen on Feb 21, 2012 @ 11:52 PM
Freebie is not installed. I can give it a try. It's not working for template group mobile__p either (our product page). Is Freebie a requirement for this aspect of the module to work? Right now we are just using {if is_mobile} to achieve our needs and for us, that might be the more elegant solution.
Support Staff 3 Posted by Wouter Vervloet on Feb 26, 2012 @ 10:25 PM
Hi Dustin,
I did some thinking and I think I figured it out. In your case, when accessing
/c/brushes
, Mobile is looking for a template called/mobile__c/brushes
which, probably doesn't exist at all since you're routing everything through the index template.Is this correct?
– Wouter
4 Posted by Dustin on Feb 27, 2012 @ 08:54 PM
Hi Wouter,
Sorry for my delay in getting back to you on this. I appreciate the follow up.
Yes, what you describe is accurate. We have the desktop version set up so that when /c/brushes is requested, it looks for the template "c/brushes". If that doesn't exist, it loads "c/index". I am trying to track down how we did this without Freebie. So far I've come up empty.
Support Staff 5 Posted by Wouter Vervloet on Feb 28, 2012 @ 07:07 PM
Well, it's not that weird actually since by default EE falls back to the index template in a template group if a specific template is not found.
If you install Freebie and you set the breaking segment to
c
it should all work fine.You will, however, need to swap all the
{segment_2}
variables in your index template to{freebie_2}
since Freebie hides those segments for EE (and Mobile).Just curious though... is 'c' by any chance your category indicator for EE?
– Wouter
6 Posted by Dustin Hansen on Mar 08, 2012 @ 05:32 PM
I've had to install Freebie to the site for other purposes and since then I'm noticing even more areas of the site where the mobile template isn't being loaded correctly. I have to do a check on every page with {if is_mobile} to serve up the right template. It's not happening automatically. Another example:
cleaning-corner
- index - tips mobile__cleaning-corner
- index - tips
Bringing up /cleaning-corner/tips on mobile is pulling up the desktop version, not the mobile version. The "cleaning-corner" URL segment is not setup in any special way that I'm aware of.
7 Posted by Dustin Hansen on Mar 08, 2012 @ 05:34 PM
I believe it's happening to all URLs now. None of them are automatically loading the mobile template.
Support Staff 8 Posted by Wouter Vervloet on Mar 08, 2012 @ 10:00 PM
Hi Dustin,
Would it be possible for me to take a look at the site (and backend) so I can see what might be going wrong?
Just an heads-up, don't reply to this mail with any credentials as this thread is automatically posted to the support forum. If you want to send me any login info, send it to wouter [at] baseworks [dot] nl
– Wouter
9 Posted by Dustin Hansen on Mar 13, 2012 @ 03:22 PM
Hello,
This email is in regards to the bug I posted here: http://support.baseworks.nl/discussions/mobile/27-mobile-template-is-not-loading. You requested I contact you via email.
The Mobile plugin is not redirecting to the mobile templates properly. I have to manually check {if is_mobile} to serve up the correct content. It also means I can't use the "{mobile:switch_to_full}" link.
Here are the login details you requested:
[REMOVED]
I have set up a very simple example for you to see. Check out the URL http://www.ocedar.com/xxyyzz. I have two templates set up:
xyyzz
- index (outputs "DESKTOP" to the screen)
mobile__xxyyzz
- index (outputs "MOBILE" to the screen)
You can see that the mobile version is not loading correctly.
Please take a look when you have a chance? Thanks very much.
--
Dustin Hansen | Sr. Application Architect, Interactive | Upshot | 350 N. Orleans, 5th Floor, Chicago, IL 60654
p: 312.895.6250 | f: 312.943.9699 | [email blocked]<mailto:[email blocked]> | www.upshot.net
Support Staff 10 Posted by Wouter Vervloet on Mar 13, 2012 @ 06:41 PM
Hi Dustin,
I figured out where things where going wrong… it seems Freebie changed something in their configuration, because it was overriding the Mobile actions.
I changed the priority of the Mobile extension in the database so it is working again, but you'll need to download a new version of Mobile to be on the safe side. You can grab v0.8.8 from the GitHub repository.
Could you check if everything is working again?
– Wouter
11 Posted by Dustin on Mar 13, 2012 @ 08:05 PM
This is working great now. Thanks so much! Sorry for the delay in getting you the information you needed. Nice work on this extension.
Support Staff 12 Posted by Wouter Vervloet on Mar 13, 2012 @ 08:08 PM
I'm glad everything is working now.
– Wouter
Wouter Vervloet closed this discussion on Mar 13, 2012 @ 08:08 PM.
Dustin re-opened this discussion on Mar 15, 2012 @ 04:32 PM
13 Posted by Dustin on Mar 15, 2012 @ 04:32 PM
Hello,
It looks like our original issue is still occurring. Most templates are pulling the mobile site, but /c is not working correctly. Thoughts on why this is?
/c/brushes should load mobile__c/index, but it's pulling c/index instead.
Is this expected behavior? Do you still recommend adding the "c" segment to Freebie as the solution to this?
14 Posted by Dustin Hansen on Mar 15, 2012 @ 04:49 PM
Hi Wouter,
I tried to respond on the forum but it wouldn't let me because the
discussion is closed, but my original issue still remainsŠ
Most templates are pulling the mobile site, but /c is not working
correctly. Thoughts on why this is?
/c/brushes should load mobile__c/index, but it's pulling c/index instead.
Is this expected behavior? Do you still recommend adding the "c" segment
to Freebie as the solution to this?
--
Dustin Hansen | Sr. Application Architect, Interactive | Upshot | 350 N.
Orleans, 5th Floor, Chicago, IL 60654
p: 312.895.6250 | f: 312.943.9699 | [email blocked] |
www.upshot.net
Support Staff 15 Posted by Wouter Vervloet on Mar 15, 2012 @ 07:45 PM
I know why it is happening, so I'll see if I can implement a quick fix for you.
– Wouter
Support Staff 16 Posted by Wouter Vervloet on Mar 15, 2012 @ 08:45 PM
Hi Dustin,
I just pushed a new version to GitHub (v0.9) which should solve your problem with the
/c/lorem
not working.https://github.com/AboutWout/mobile.ee2_addon
I've done some quick tests here and it all seems to work.
– Wouter
Wouter Vervloet closed this discussion on Jul 14, 2012 @ 11:14 AM.