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

[Checkout] Prevent extra fields when login in on addressing page #15435

Merged

Conversation

Jibbarth
Copy link
Contributor

Q A
Branch? 1.12
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #15183
License MIT

Refs video in #15183

When we login in addressing page after submit once the page, the reload process after login resubmit data, and keep sending form[customer][email], that it doesn't be added in form.

So I unset these data on pre-submit.
I also change the csrf_error message for something more "understandable".

By this way, we can still have previous submitted data for address fields.

image

The other way, suggested by @Wojdylak, is to change this line https://github.com/Sylius/Sylius/blob/1.12/src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-api-login.js#L50
by

window.location = window.location.href;

But using it, all already filled data are lost.

WDYT ? Would it be acceptable to lose such data, or should we keep them ?

@Jibbarth Jibbarth requested a review from a team as a code owner October 14, 2023 11:31
@github-actions
Copy link

github-actions bot commented Oct 14, 2023

Bunnyshell Preview Environment deleted

Available commands:

  • /bns:deploy to redeploy the environment

Copy link
Contributor

@vvasiloi vvasiloi left a comment

Choose a reason for hiding this comment

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

Hey @Jibbarth, thanks for your contribution! I left some feedback. Could you also add a test for it?

Co-authored-by: Victor Vasiloi <victor.vasiloi@gmail.com>
@Jibbarth
Copy link
Contributor Author

Jibbarth commented Dec 9, 2023

Thanks for the review @vvasiloi. I will try to make a test 🤞

@NoResponseMate NoResponseMate added Shop ShopBundle related issues and PRs. Bug Confirmed bugs or bugfixes. labels Dec 11, 2023
@jakubtobiasz jakubtobiasz dismissed vvasiloi’s stale review December 12, 2023 09:53

Tests have been added :)

@jakubtobiasz jakubtobiasz merged commit f12a530 into Sylius:1.12 Dec 12, 2023
25 checks passed
@jakubtobiasz
Copy link
Member

Thank you, @Jibbarth!

@Jibbarth Jibbarth deleted the fix/login-addressing-submit-extra-fields branch December 12, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes. Shop ShopBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants