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

Fix cms form reset on failed ajax form submission #4583

Closed
wants to merge 1 commit into from

Conversation

hype09
Copy link
Contributor

@hype09 hype09 commented Aug 27, 2024

1. Why is this change necessary?

In #3753, I inadvertently introduced the bug described in #4422.

2. What does this change do, exactly?

Instead of always clearing the form after the content is submitted, we only clear it when the submission was actually successful.

3. Describe each step to reproduce the issue or behaviour.

  • Go to the contact form.
  • Enter all the information.
  • Ensure the server-side validation fails, e.g. by mis-typing the captcha.
  • The form is being reset (which it shouldn't be).

4. Please link to the relevant issues (if any).

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • [ ] I have written or adjusted the documentation according to my changes
  • [ ] This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

@tobiasberge
Copy link
Contributor

Hey @hype09,

sorry for our delayed review. I was able to reproduce the problem and your solution solves it. 👍

Thank you for your fix. 🎉

We have now imported your PR and will process it soon.

@tobiasberge
Copy link
Contributor

Hi @hype09 your changes were merged to trunk: 9552099

Thank you for your contribution.

@hype09 hype09 deleted the paik/cms-form-reset-fix branch October 7, 2024 13:07
flkasper pushed a commit to flkasper/shopware-shopware that referenced this pull request Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants