Closed tylkomat closed 3 weeks ago
I still receive the same error. Looks like the SelectViewhelper is still evaluated although the section is not used.
I tested the extension under Typo3 12 and there I also get the same error. In the Typo3 documentation I can't find onchange
as a property on the SelectViewHelper.
Ah, interesting, thanks for the follow-up, I must admit my latest test was with ~TYPO3 v13~ TYPO3 v12, strange [edit].
Just debugged in TYPO3 v12, onchange
is indeed an undeclared argument, but it is "catched" in
vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php:78
then passed tovendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractTagBasedViewHelper.php:171
as argument to be added just like that.However, I just think that we could certainly do that instead (only for TYPO3 v12 and up):
diff --git a/Resources/Private/Partials/ConfigurationRecords.html b/Resources/Private/Partials/ConfigurationRecords.html
index 1a68a34..7069dab 100644
--- a/Resources/Private/Partials/ConfigurationRecords.html
+++ b/Resources/Private/Partials/ConfigurationRecords.html
@@ -52,9 +52,10 @@
value="{currentConfiguration}"
optionValueField="uid"
optionLabelField="name"
- onchange="this.form.submit();"
class="form-select form-select-sm form-control"
- style="display: inline-flex; width: 100%;"/>
+ style="display: inline-flex; width: 100%;"
+ additionalAttributes="{onchange: 'this.form.submit();'}"
+ />
</f:section>
</html>
Yes, that works under Typo3 v11 as well and removes the need to have separate handling between v11 and v12+.
In latest Typo3 11.5.41 this Error is shown when entering the LDAP/SSO backend module.
Undeclared arguments passed to ViewHelper TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper: onchange. Valid arguments are: additionalAttributes, data, aria, name, value, property, class, dir, id, lang, style, title, accesskey, tabindex, onclick, size, disabled, options, optionsAfterContent, optionValueField, optionLabelField, sortByOptionLabel, selectAllByDefault, errorClass, prependOptionLabel, prependOptionValue, multiple, required