3

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?

  • 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. – Victor In Jun 29 '14 at 11:10
  • 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 Jun 29 '14 at 16:23
  • Glad it worked, I actually just had the same "error" a few days ago. – Victor In Jun 29 '14 at 16:47
5

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;
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.