Back to Form Builder Support

Sevenface
Sevenface

After I installed the Translate Plugin I got errors:

"htmlentities() expects parameter 1 to be string, array given" on line 469 of ../vendor/laravel/framework/src/Illuminate/Support/helpers.php

Bisunto
Bisunto

Sevenface said:

After I installed the Translate Plugin I got errors:

"htmlentities() expects parameter 1 to be string, array given" on line 469 of ../vendor/laravel/framework/src/Illuminate/Support/helpers.php

Same problem here

Bisunto
Bisunto

Oke a little hint, the error message is not shown if all the "Add Field" modal fields are full filled.. Any Ideas?

mrbohnke
mrbohnke

Same problem here!

UpTop
UpTop

We experience this bug too. It's due too the validation_messages and options repeater that return incorrect values. This seems to be a problem in the Core of the October as we've experienced this bug multiple times already with other (custom) plugins.

Daniel
Daniel

Yes. It is a problem because laravel can't escape an array. It's a bug in the translate plugin... I have added some little pull request. It just checks in _locale_values.htm if the $value i an empty array and sets then an empty string...

    if (empty($value))
        $value = "";

It works with this fix... Maybe there is an official update coming soon on the translate plugin....

mrbohnke
mrbohnke

It totally works, indeed. Thank you!

Well, the form fields panel doesn't show an error anymore, but it also doesn't update changes for translations…

Last updated

Daniel
Daniel

mrbohnke said:

It totally works, indeed. Thank you!

Well, the form fields panel doesn't show an error anymore, but it also doesn't update changes for translations…

Really? I need to check this. I have not experienced that.. Thanks

Renatio
Renatio

Hi,

this is a bug in RainLab.Translate plugin. Reported here: https://github.com/rainlab/translate-plugin/issues/193

Another issue with RainLab.Translate plugin it does not save fields in relation manager widget. Reported here: https://github.com/rainlab/translate-plugin/issues/209

Another issue was reported here: http://octobercms.com/plugin/support/renatio-formbuilder/plugin-not-working-when-translate-plugin-is-also-installed

In version 1.2.9 to suppress those errors and RainLab.Translate plugin limitations I decided to remove options and validation messages from translatable attributes.

There is still a solution to make field label translatable. You just need to update field type markup and use |_ translate filter. Eg. replace {{ label }} with {{ label|_ }}. Now you can translate labels in Settings -> Translate -> Translate Messages.

1-9 of 9