cart icon indicating copy to clipboard operation
cart copied to clipboard

The argument “additionalAttributes” was registered with type “array”, but is of type “string” in view helper “TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper”

Open basvandertogt opened this issue 8 years ago • 2 comments

I’m facing this error: #1237900529: The argument “additionalAttributes” was registered with type “array”, but is of type “string” in view helper “TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper” It looks like this has something todo with this viewhelper: <f:form.checkbox name=“shipping_same_as_billing” id=“shipping_same_as_billing” value=“{f:if(condition:‘{cart.shippingCountry}‘,then:‘false’,else:‘true’)}” title=“{f:translate(key:‘tx_cart.same_address’)}” additionalAttributes=“{f:if(condition:‘{cart.shippingCountry} == \‘\’‘, then: ‘{checked: \‘checked\‘}’)}“/>

I fixed this by:

<f:form.checkbox name=“shipping_same_as_billing” id=“shipping_same_as_billing” value=“{f:if(condition:‘{cart.shippingCountry}‘,then:‘false’,else:‘true’)}” title=“{f:translate(key:‘tx_cart.same_address’)}” additionalAttributes="{f:if(condition: cart.shippingCountry, else: '{checked: 'checked'}')}"/>

basvandertogt avatar Sep 11 '17 09:09 basvandertogt

thanks! worked also for me

matin73 avatar Jan 18 '18 18:01 matin73

<f:form.checkbox name="shipping_same_as_billing" id="shipping_same_as_billing" value="{f:if(condition:'{cart.shippingCountry}',then:'false',else:'true')}" title="{f:translate(key:'tx_cart.same_address')}" additionalAttributes="{f:if(condition: cart.shippingCountry, else: '{checked: checked}')}"/>

seems correct

matin73 avatar Jan 18 '18 18:01 matin73