Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Framework: Number - step option bug #19

Open
madalinatarcea opened this issue Aug 27, 2021 · 4 comments
Open

Form Framework: Number - step option bug #19

madalinatarcea opened this issue Aug 27, 2021 · 4 comments

Comments

@madalinatarcea
Copy link

madalinatarcea commented Aug 27, 2021

If we set the step option we got this error: bcs the value from step is int
Screen Shot 2021-08-27 at 8 15 23 AM
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
);
}

@galoppi
Copy link
Member

galoppi commented Aug 27, 2021

Which TYPO3 version do you use?

@madalinatarcea
Copy link
Author

typo3 10.4.19

@galoppi
Copy link
Member

galoppi commented Sep 2, 2021

@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.

@bakfunk
Copy link

bakfunk commented Sep 13, 2021

@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>

bakfunk pushed a commit to bakfunk/translatelabels that referenced this issue Sep 24, 2021
weakbit added a commit to pluswerk/translatelabels that referenced this issue Mar 20, 2023
[BUGFIX] fixing bug sitegeist#19 TypeError by adding step option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants