excelwebzone / EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.
MIT License
396 stars 160 forks source link

[Symfony 4.2] Twig failed to render the widget #226

Closed ihortymoshenko closed 5 years ago

ihortymoshenko commented 5 years ago

Hi!

I'm updating a project from Symfony 4.1 to Symfony 4.2 and I'm faced with a problem.

Twig can't render the widget and outputs the following:

An exception has been thrown during the rendering of a template ("Notice: Array to string conversion").

The last step in the traceback refers to https://github.com/symfony/twig-bridge/blob/v4.2.7/Resources/views/Form/form_div_layout.html.twig#L432.

It looks like the issue in the form type options. The attr option contains the options key which is an array (the attr option is an associative array with HTML attributes as keys accordingly to the Symfony docs).

Please fix this issue.

Cheers!

guzzlefry commented 5 years ago

This is still an issue with version 1.5.15 on Symfony 4.3.x.

sonofliberty commented 4 years ago

@IgorTimoshenko Did you manage to fix this issue in your project? I'm having the same problem.

icedevelopment commented 2 years ago

see https://github.com/excelwebzone/EWZRecaptchaBundle/issues/234#issuecomment-1098792678