<p>Just an idea, but are you <a href="http://buildwithcraft.com/docs/plugins/controllers#allowing-anonymous-access-to-actions">Allowing Anonymous Access to Actions</a>? Maybe you are logged in on your Desktop, but not on your iPhone.</p>

<p>Example:</p>

<pre class="lang-php prettyprint-override"><code>protected $allowAnonymous = true;
</code></pre>

CC BY-SA 3.0
2014-06-30T04:30:34.457Z
Great catch Victor!
Selvin Ortiz
CC BY-SA 3.0
2014-06-29T16:47:11.787Z
2014-06-29T16:47:11.787Z
Victor
<p>I'm not sure how to ask this question.  I have a form. It works just fine on desktops.  However when the form is submitted on iPhone or iPad it never makes it to my controller and resolves to the URL /login with a 404 (which is correct, because I don't have a /login template).</p>

<p>It seems this is true for custom controllers and for Craft forms like 'entries/saveEntry'. 
I don't have any routes or other rules that target the 'login' url or any other URLs I'm using in the action parameter that I can determine. I've uninstalled all plugins.  Logs only report the 404 error message but they also seem to report that second page request to the 'login' URL.</p>

<p>I've traced the request through the WebApp.php file all the way to around line 254 where WebApp.php hands things off to the UrlManager:</p>

<pre><code>parent::processRequest();
</code></pre>

<p>Any ideas what I should be looking for here?  I'm not even sure why this would be happening and feel I'm getting too deep as most routing in Craft is pretty straightforward.  Could there be any other, obvious settings or anything I might be overlooking?</p>

CC BY-SA 3.0
2014-06-29T11:10:52.337Z
Just and idea, but have you added your action to `$allowAnonymous`? Maybe you are logged in on your desktop, but not on your iPhone.
Victor
CC BY-SA 3.0
2014-06-29T16:23:30.263Z
You got it Victor. It was right in front of me all along.  Please go ahead and make that an answer and I'll mark it as correct.
Ben Parizek
CC BY-SA 3.0
2014-06-29T16:47:52.863Z
Glad it worked, I actually just had the same "error" a few days ago.
Victor
<controller><form><routes>
Where do I begin troubleshooting a Form in Craft that is redirecting to /login on iPad and iPhone?
# Where do I begin troubleshooting a Form in Craft that is redirecting to /login on iPad and iPhone?

(Asked by: username_0 on 2014-06-29)

I'm not sure how to ask this question.  I have a form. It works just fine on desktops.  However when the form is submitted on iPhone or iPad it never makes it to my controller and resolves to the URL /login with a 404 (which is correct, because I don't have a /login template).
It seems this is true for custom controllers and for Craft forms like 'entries/saveEntry'. 
I don't have any routes or other rules that target the 'login' url or any other URLs I'm using in the action parameter that I can determine. I've uninstalled all plugins.  Logs only report the 404 error message but they also seem to report that second page request to the 'login' URL.
I've traced the request through the WebApp.php file all the way to around line 254 where WebApp.php hands things off to the UrlManager:
parent::processRequest();

Any ideas what I should be looking for here?  I'm not even sure why this would be happening and feel I'm getting too deep as most routing in Craft is pretty straightforward.  Could there be any other, obvious settings or anything I might be overlooking?

**Tags:** controller, form, routes

> **Comments:**
> **username_1**: Just and idea, but have you added your action to `$allowAnonymous`? Maybe you are logged in on your desktop, but not on your iPhone.  
> **username_0**: You got it username_1. It was right in front of me all along.  Please go ahead and make that an answer and I'll mark it as correct.  
> **username_1**: Glad it worked, I actually just had the same "error" a few days ago.  

---

## 1 answers

### Answer by username_1 on 2014-06-29. Score: 5 | Accepted answer

Just an idea, but are you Allowing Anonymous Access to Actions? Maybe you are logged in on your Desktop, but not on your iPhone.
Example:
protected $allowAnonymous = true;

> **Comments:**
> **username_2**: Great catch username_1!  

---

