Open madalinatarcea opened 2 years ago
Which TYPO3 version do you use?
typo3 10.4.19
@madalinatarcea: Could you please check if the error still exists in version 2.0.12 of this extension? If yes, please give me more details, f.e. the yaml file of your form definition, so that I can reproduce the error.
@galoppi unfortunatly the error still exisits in version 2.0.12, i am a coworker of @madalinatarcea and working on a project with the same bug.
In the Yaml File the step option creates the bug as @madalinatarcea said. Here an example:
-
defaultValue: ''
properties:
fluidAdditionalAttributes:
step: 1
type: Number
identifier: number-1
label: Number
validators:
-
identifier: Number
-
Here an example form that triggers the bug:
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<formvh:renderRenderable renderable="{form}">
<formvh:form
object="{form}"
action="{form.renderingOptions.controllerAction}"
method="{form.renderingOptions.httpMethod}"
id="{form.identifier}"
section="{form.identifier}"
enctype="{form.renderingOptions.httpEnctype}"
addQueryString="{form.renderingOptions.addQueryString}"
argumentsToBeExcludedFromQueryString="{form.renderingOptions.argumentsToBeExcludedFromQueryString}"
additionalParams="{form.renderingOptions.additionalParams}"
additionalAttributes="{formvh:translateElementProperty(element: form, property: 'fluidAdditionalAttributes')}"
class="js-form"
>
<div class="js-message_error message_error" data-emptyErrorMsg="{f:translate(key: 'validation.empty.errorMsg', extensionName: 'test')}" data-emailErrorMsg="{f:translate(key: 'validation.email.errorMsg', extensionName: 'test')}"></div>
<f:render partial="{form.currentPage.templateName}" arguments="{page: form.currentPage}" />
<div class="actions">
<f:render partial="Form/Navigation" arguments="{form: form}" />
</div>
</formvh:form>
</formvh:renderRenderable>
</html>
If we set the step option we got this error: bcs the value from step is int
Could you pls fix that? maybe adding on line: 142 -> Classes/ViewHelpers/TranslateElementPropertyViewHelper.php if (is_string($value)) { $ret[$key] = self::renderTranslation( $translationKey . '.' . $key, $value, $translationArguments ); }