Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userfrosting/account/404.php Error #155

Closed
vicmontol opened this issue Nov 12, 2014 · 5 comments
Closed

userfrosting/account/404.php Error #155

vicmontol opened this issue Nov 12, 2014 · 5 comments
Assignees
Labels
confirmed bug Something isn't working

Comments

@vicmontol
Copy link

HeY! I'm just playing around with this code. Made a new fresh install of UF 0.2.2 in Wamp 2.2 (PHP 5.3.9 - changed the modern notation arrays [ ] to array() in all pages needed to work succesfully).

I've noticed that in admin dashboard - being the admin account -, if I log out, then try to login with an existing user account, it gives me a redirect to [path]/userfrosting/account/404.php ,which obviously doesn't exist, and keeps returning until I close session (cache and http auth clearing doesn't work).

Can't find the exact error as console didn't give me any messages. Any clues? Thnx

@lilfade
Copy link
Contributor

lilfade commented Nov 13, 2014

Is this just a base install with one added user via the admin panel? I'll need some more information anything else you can think of or did.

I know there is some places where the array [] is used in odd places (eg. functions and stuff) that may be a issue ill have to get around to checking that out sometime.

@lilfade
Copy link
Contributor

lilfade commented Nov 13, 2014

Okay i fixed the 404 page error but wont be up til the 0.2.3 is pushed, to fix it for now add a 404.php into account with this for the code:

<?php
header('Location: ../404.php');

As for why it keeps redirecting you to the 404.php page im not sure why until you can get back to me on any extra information.

@vicmontol
Copy link
Author

The fix seems to work as long as I can't get the error back again.
I made a new install with 0.2.2 (+ fix) and repeat the same steps before:

  • install with Enable User Registration OFF - Require Email Activation OFF - Enable Email Login ON
  • create master account and login as admin
  • go to users in admin panel and create new standard user for gruoup: user
  • log out
  • login as user (from login.php)
  • 404 infinity loop page

This time it works fine - no 404 and no redirect -
I'm trying a new install without fix and check again, I´ll keep you updated.
Thanks.

@alexweissman
Copy link
Member

Yeah there are couple of places in the code, probably left over from some previous version, that just seem to try and forward a user to a generalized 404.php page. I think the idea was to handle certain types of page requests that fail authentication.

However, now that I think about it, forwarding to a 404 page makes no sense. 404 is supposed to be "page not found". I would recommend that we replace those instances with adding an alert to the error stream, and then just taking the user back to either the referring page, or the home page.

@alexweissman alexweissman added the confirmed bug Something isn't working label Nov 14, 2014
@alexweissman alexweissman self-assigned this Dec 8, 2014
@alexweissman
Copy link
Member

This should now be fixed (a3045b2). Further testing is recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants