Open tacman opened 2 years ago
I've created a repo that shows the problem:
Thanks for the demo.
In your framework.yaml set http_method_override
to true
and it should work.
Did you explicitly set that to false, or was it auto-generated?
It seems that I should either update the documentation or check if using PATCH method for the form is worth the hassle.
That was auto-generated.
Thanks!
On Tue, Aug 23, 2022 at 4:10 PM Andras @.***> wrote:
Thanks for the demo. In your framework.yaml set http_method_override to true and it should work.
Did you explicitly set that to false, or was it auto-generated?
It seems that I should either update the documentation or check if using PATCH method for the form is worth the hassle.
— Reply to this email directly, view it on GitHub https://github.com/tzunghaor/settings-bundle/issues/3#issuecomment-1224788157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXIQNVTGCCU7ODMNOPGTDV2UV2NANCNFSM57L7WBOA . You are receiving this because you authored the thread.Message ID: @.***>
I ran into this issue as well. Looking into the Symfony community I found this. https://github.com/symfony/symfony/issues/45278 Sounds like this will be a default moving forward.
here is what my YAML file looks like now.
# config/packages/tzunghaor_settings.yaml
tzunghaor_settings:
collections:
# Each entry under "tzunghaor_settings" configures a setting collection.
default:
cache: 'cache.app'
mappings:
default:
dir: '%kernel.project_dir%/src/Settings'
prefix: App\Settings\
framework:
# the form is not saving, due to default symfony configuration
# https://github.com/tzunghaor/settings-bundle/issues/3
# https://github.com/symfony/symfony/issues/45278
http_method_override: true
Thanks for the tip, @jmwamser. Your comment went a bit under the radar as it was in a closed issue, so I reopened it so that I don't forget about it.
I think I'm following the instructions, but when I edit the settings, they're not being saved.
The issue is that $form->isSubmitted() is returning false, even though it looks like it's submitting correctly.
I'm using the BoxSettings as described in the documentation.
I imagine it's something simple, any ideas on where I should be looking?