FormHelper hiddenfield double POSTed

Hello all!

Since yesterday I have a weird problem I absolutely cannot understand anymore (after updateing CakePHP to latest version from previous V5.1.xx).

A Checkbox in my form (with the automatically added hiddenfield) ist POSTed two times so the FormProtectionComponent is failing.

For example:
Simple login form with email, password and remember_me checkbox:
When analyzing the request I can see that the remember_me field is send two times with value 0 and 1

Was there anything changed in handling of radios and checkboxes and their hidden fields?
I am sure it must be something in genaral because on every form I have this error. And when disabling FormProtectionComponent everything works fine.

Thank you for your help :slight_smile:

try this

<?=$this->Form->checkbox('remember_me', [ 'hiddenField' => false, ])?>

Thank you Rods, thats something I tried earlier.
I found out that this isnt the problem.

My problem is, that after sending my form everytime the FormProtectionComponent fails with validation. And I am getting a Cake\Http\Exception\BadRequestException error.

When diabling FormProtectionComponent everything works fine, but without protection. Any ideas why this could happen or what I can do? Thank you :slight_smile:
This happens to every form on my website.

After some test I tried now to access my page local via HTTPS and its working. But why?