Skip to content

Sheffield | 25-SDC-Nov | Sheida Shabankari | Sprint 1 | Can't log in from profile page#104

Open
sheida-shab wants to merge 3 commits intoCodeYourFuture:mainfrom
sheida-shab:Feat-fixBug-loginFromProfilePage
Open

Sheffield | 25-SDC-Nov | Sheida Shabankari | Sprint 1 | Can't log in from profile page#104
sheida-shab wants to merge 3 commits intoCodeYourFuture:mainfrom
sheida-shab:Feat-fixBug-loginFromProfilePage

Conversation

@sheida-shab
Copy link

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

PR Summary:
Previously, visiting another user's profile after logging out and logging back in caused a server error (501: Server does not support this operation). The root cause was that the login button was handled via a click event, which did not properly trigger form submission and associated server logic in some cases.

The first login succeeded because the DOM and state were in a clean initial state. After logout, the login view was re-rendered, and the click-based handler was no longer reliably attached.

This PR changes the login flow to handle the form submit event instead of just the button click, ensuring that logging in fully executes the server-side login process. Handling login via the form’s submit event ensures consistent behaviour across re-renders. After this fix, users can log out and log back in, and visiting another user's profile works as expected.

@sheida-shab sheida-shab added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Legacy-Code The name of the module. labels Feb 3, 2026
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally looks good, and your description is really clear.

There appears to be an unrelated change in this PR related to hashtag infinite requests - please can you remove that from this PR?

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 4, 2026
@sheida-shab sheida-shab force-pushed the Feat-fixBug-loginFromProfilePage branch from ba52454 to ebc0759 Compare February 5, 2026 20:24
@sheida-shab
Copy link
Author

Hi,
I’ve removed the unrelated hashtag commits from this PR, so it now only includes the login changes.
The previous fixes remain in this branch intentionally, as I continued working from the latest updated version of the code.
I hope this addresses your feedback.
Thank you for your review!

@sheida-shab sheida-shab added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Legacy-Code The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants