Skip to content

[Form][TwigBridge] render hidden _method field in form_rest() #23254

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

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 21, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14261
License MIT
Doc PR

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

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

👍

@fabpot
Copy link
Member

fabpot commented Jun 21, 2017

Thank you @xabbuh.

@fabpot fabpot merged commit 0ee3f57 into symfony:2.7 Jun 21, 2017
fabpot added a commit that referenced this pull request Jun 21, 2017
…t() (xabbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

[Form][TwigBridge] render hidden _method field in form_rest()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14261
| License       | MIT
| Doc PR        |

Commits
-------

0ee3f57 render hidden _method field in form_rest()
@xabbuh xabbuh deleted the issue-14261 branch June 21, 2017 20:12
ogizanagi added a commit that referenced this pull request Jul 25, 2017
… a child form (fmarchalemisys)

This PR was squashed before being merged into the 2.7 branch (closes #23649).

Discussion
----------

[Form][TwigBridge] Don't render _method in form_rest() for a child form

The hidden `_method` must only be generated if the form is the top most form.

Always generating the hidden `_method` breaks forms using the POST method when they have children using the PUT method. If `_method` is generated for such a child form, it overrides the parent method and the form fails to validate.

See issue #23254

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14261
| License       | MIT
| Doc PR        |

Commits
-------

973b2d3 [Form][TwigBridge] Don't render _method in form_rest() for a child form
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.

4 participants