I have two instances of a Drupal 7 website, but only one is working correctly, and the issue is *somehow* related to the mobile_theme module. I will call them Site A (working) and Site B (not working).
I am of course using the mobile_theme module, and is configured as such:
Detection Method: PHP
Mobile Theme: my_mobile_theme
So, Site A and Site B have an identical (as far as I can tell) codebase, but obviously there is something wrong.
Site A detects that my browser is mobile and switches to my mobile theme, my_mobile_theme.
Looks and functions perfectly.
Site B detects that my browser is mobile and switched to my mobile theme, my_mobile_theme.
BUT it appears as if it's missing all it's CSS, but after further examining, the CSS is being included correctly, but the generated HTML markup is different between them. So, these different id's and classes are not found in the CSS, resulting in a crappy looking site.
But, from what I can tell diff-checking code, both sites should be detecting and switching to the mobile theme, my_mobile_theme, which is a subtheme of the Aurora theme.
I've checked all configurations on my_mobile_theme and the base theme Aurora, so I'm running out of ideas.
Any ideas or ways I can check exactly what's happening?
Comments
Comment #1
joshua.boltz commentedWell, I answered my own question. After digging around and comparing files after file across both sites, i noticed that the site that wasn't working had some extra template files (html.tpl.php, block.tpl.php, page.tpl.php, node.tpl.php) in my mobile theme's templates directory. The files were still living on the server but hidden from me in our source control. No wonder it was a nightmare to debug.
In the end, those template files were overwriting the template files of the base theme, resulting in the differences in generated HTML.
Removing the template files from my mobile theme allowed the base theme to use its template files and correctly generate the HTML.
Hope this helps someone else.
Comment #2
henrijs.seso commented