I'm trying to build my first mobile site, so I'm learning a bit and I might have done something wrong. But I do think I ran into a bug. I'm a big fan of Display Suite so I was happy to see that Mobile Tools has support for Display Suite, but with Mobile Tools enabled (and the Display Suite support) I somehow get
for all nodes, for all User-Agents.
I'll try to find out why it's doing that but some help about where to look would be highly appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mobile_tools_static_ds_fix.patch | 752 bytes | okokokok |
Comments
Comment #1
okokokok commentedI thought it might have something to do with cache so I turned that off, but it's still acting weird.
This seems a relevant piece of code:
function mobile_tools_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if ($op == 'load' && mobile_tools_site_type() == 'mobile' && variable_get('mobile_tools_enable_build_mode', 0)) {
$node->build_mode = 'mobile';
}
}
So I suspected a problem with mobile_tools_site_type().
I added a static caching around it and now things work as expected!
Comment #2
okokokok commentedComment #3
okokokok commentedOops. This was working better but it was wrong. I noticed the problem when I actually wanted to start using the buildmode-mobile.
The condition should be:
if ($site_type != NULL) {Comment #4
minoroffense commentedIs the above code correct? If so I can apply it as a patch.
Comment #5
devin carlson commentedThis was fixed as part of #1003732: Improve Mobile Tools performance.