# Save form causes 500 internal server error

**URL:** <https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [October 12, 2021, 2:05pm UTC](https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238 "2021-10-12T14:05:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mtic/32/627_2.png) [@mtic](https://forum.mautic.org/u/mtic)\
**Post date:** [October 12, 2021, 2:05pm UTC](https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238/1 "2021-10-12T14:05:34Z")

</div>

**Your software**  
My Mautic version is: 4.0.1  
My PHP version is: 7.4.22  
My Database type and version is: MySQL 5.7.33

**Your problem**  
My problem is: When I try to save my form I get Internal Sever Error 500.

These errors are showing in the log:  
[2021-10-12 14:01:45] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\UnexpectedTypeException: “Expected argument of type “null or string”, “boolean” given” at /var/www/vhosts/h189367.web200.dogado.net/connect.jiva.one/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php line 49 {“exception”:"[object] (Symfony\Component\Form\Exception\UnexpectedTypeException(code: 0): Expected argument of type “null or string”, “boolean” given at /var/www/vhosts/h189367.web200.dogado.net/connect.jiva.one/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php:49)"}

Steps I have tried to fix the problem:  
I do not use a boolean or radio field in the form but a checkbox, so I cannot really make sense of this error.

---

<div class="post-metadata">

**Author:** ![mtic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mtic/32/627_2.png) [@mtic](https://forum.mautic.org/u/mtic)\
**Post date:** [October 12, 2021, 7:45pm UTC](https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238/2 "2021-10-12T19:45:28Z")

</div>

It seems this is this issue:

> <https://github.com/mautic/mautic/issues/10453>
>
> \### Mautic Version
> 
> 4.0.0
> 
> \### PHP version
> 
> 7.4.23
> 
> \### What browsers ar…e you seeing the problem on?
> 
> Chrome
> 
> \### What happened?
> 
> This is basically a replica of #10450 as that Issue was written in german.
> 
> When using forms and deactivating "Render Style from Template", and trying to save you will end up getting a Error 500.
> 
> 
> 
> \### How can we reproduce this issue?
> 
> 
> 1. Go to forms
> 2. Create a new Form
> 3. Deactivate "Render Style from Template"
> 4. Save the form
> 
> Bonus:(If it seemed to have saved errorless, open the form, activate, save and then deactivate the "Render Style from Template again and see wether you get an error or not")
> 
> \### Relevant log output
> 
> \`\`\`shell
> Mautic error log:
> \[2021-09-20 06:33:58\] mautic.CRITICAL: Uncaught PHP Exception Symfony\\Component\\Form\\Exception\\UnexpectedTypeException: "Expected argument of type "null or string", "boolean" given" at /var/www/mautictestsystem.com/htdocs/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php line 49 {"exception":"\[object\] (Symfony\\\\Component\\\\Form\\\\Exception\\\\UnexpectedTypeException(code: 0): Expected argument of type \\"null or string\\", \\"boolean\\" given at /var/www/mautictestsystem.com/htdocs/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php:49)"} \[\]
> 
> 
> Find a more detailed error log in the issue linked in the description.
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [December 7, 2021, 4:00pm UTC](https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238/3 "2021-12-07T16:00:43Z")

</div>

We too are having this issue for some time now, which renders Mautic useless for us.

I have posted in [Github](https://github.com/mautic/mautic/issues/10453) as well as the [community Slack](https://mautic.slack.com) but have yet to find a solution.

EDIT: We have generated assets and cleared cache with mautic directory:

```auto
php bin/console mautic:assets:generate
rm -rf var/cache/*

```

Please help. We’re at a crossroads here.

Thanks,  
EP

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [December 9, 2021, 12:17am UTC](https://forum.mautic.org/t/save-form-causes-500-internal-server-error/21238/4 "2021-12-09T00:17:40Z")

</div>

Issue resolved! (for us and others)  
[https://github.com/mautic/mautic/issues/10453](https://github.com/mautic/mautic/issues/10453)
