tag:support.baseworks.nl,2011-05-09:/discussions/mobile/16-ee-debug-prefs-cause-mobile-to-failBaseworks: Discussion 2011-12-10T00:23:24Ztag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-08T20:32:31Z2011-12-08T20:32:31ZEE debug prefs cause Mobile to fail?<div><p>Hi Carl,</p>
<p>Could you download the lastest version (0.8.7) of Mobile from
<a href="https://github.com/AboutWout/mobile.ee2_addon">GitHub</a>
and check if that works alright? There was a bug that prevented
Mobile to work properly when used with Structure that has been
fixed since the version you're using.</p>
<p>– Wouter</p></div>Wouter Vervloettag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-09T21:28:23Z2011-12-10T00:01:00ZEE debug prefs cause Mobile to fail?<div><p>Hi --</p>
<p>Unfortunately 0.8.7 didn't help. We were still getting errors,
and Safe Harbor would not run its automated backups. Based on help
we got from the guys who make the Safe Harbor add-on, we modified
exp.mobile.php at line 212 so that there is a default value for
$agent, and HTTP_USER_AGENT is used only if it is not empty:</p>
<pre>
<code>private function _is_mobile()
{
$agent = '';
if( !empty($_SERVER['HTTP_USER_AGENT']) )
{
$agent = $_SERVER['HTTP_USER_AGENT'];
}</code>
</pre></div>carl.lorentzentag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-09T21:29:27Z2011-12-09T21:29:27ZEE debug prefs cause Mobile to fail?<div><p>Argh, sorry. Formatting of that code got all messed up.
Hopefully you can make sense of it. :)</p></div>carl.lorentzentag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-10T00:02:41Z2011-12-10T00:02:41ZEE debug prefs cause Mobile to fail?<div><p>What are the errors you were getting? I thought it just wasn't
redirecting...</p>
<p>(btw... if you indent code blocks by 4 (or more) spaces it gets
outputted nicely)</p>
<p>– Wouter</p></div>Wouter Vervloettag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-10T00:16:48Z2011-12-10T00:16:48ZEE debug prefs cause Mobile to fail?<div><p>Sorry, I didn't explain myself fully. We were having two
problems:<br>
1) if Debug Prefs were set to 0, things within the Mobile pages
failed to display/function properly (this could have been an issue
with the templates, which I didn't build)<br>
2) Safe Harbor could not run automated backups because an error was
coming up from exp.mobile.php:<br>
Undefined index: HTTP_USER_AGENT</p>
<p>The Debug pref setting is not important to me so long as Safe
Harbor can run backups and the Mobile pages display/function as
intended. So incorporating the fix from comment <a href=
"/discussions/mobile/3" title="Discussion #3">#3</a> above took
care of things for us, and now all is well.</p>
<p>Best,</p>
<p>--Carl.</p></div>carl.lorentzentag:support.baseworks.nl,2011-05-09:Comment/119881292011-12-10T00:23:23Z2011-12-10T00:23:23ZEE debug prefs cause Mobile to fail?<div><p>Glad you were able to fix it yourself, but I will take it into
account when doing the next round of revisions on Mobile.</p>
<p>Thanks for taking the time to explain things to me.</p>
<p>– Wouter</p></div>Wouter Vervloet