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

Page redirection problems #116

Open
vinsdragonis opened this issue Aug 31, 2022 · 3 comments
Open

Page redirection problems #116

vinsdragonis opened this issue Aug 31, 2022 · 3 comments
Labels
bug Something isn't working extra attention needed Something needs extra attention urgent Something needs immediate attention

Comments

@vinsdragonis
Copy link
Owner

Describe the bug
When users have created a new post, they remain stuck on the write page while the post is created. Similar behavior is observed in a few other instances, such as the deletion of a post wherein the user remains on the post's page after clicking the delete button, redirection to the homepage URL after logging in, and registering a new account.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new account
  2. The homepage is displayed, but the URL is that of the register page
  3. Login using an account
  4. The same issue is observed as with the register issue
  5. Go to 'write' page
  6. Fill in the data for relevant fields
  7. Click on Publish
  8. There is no redirection to the post's page
  9. Verify post creation by going to the homepage
  10. Click on the post
  11. Click on the delete button
  12. There is no redirection back to the homepage

Expected behavior

  • The user should be redirected to the homepage after logging in or registering a new account.
  • The user should be redirected to the post page after creating the post.
  • The user should be redirected to the homepage after deleting a post.
@vinsdragonis vinsdragonis added bug Something isn't working extra attention needed Something needs extra attention urgent Something needs immediate attention labels Aug 31, 2022
@vikashjajra
Copy link
Contributor

Seems to work fine for me. On local and live.

@vinsdragonis
Copy link
Owner Author

While it does render the appropriate page thanks to the new update, the url doesn't seem to change in some cases.
Could you try and test if it loads the home url when we login?

Thanks

@vikashjajra
Copy link
Contributor

I don't really understand the working of login in the code. On login submit, we send the data to Axios, and on validation, we dispatch a LOGIN_SUCCESS event. Where does that logic reside? It changes the appearance of the login page to the homepage but with no posts and the URL doesn't change. If using a window replace location after login then it looks as if it logs in, the login form disappears, the empty home page appears without any posts and login URL, and then it reloads to the homepage with posts, this time with the correct URL.

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

No branches or pull requests

2 participants