Be part of the future of TYPO3! Support Gridelements now and unlock exclusive early access to v13! The well-established Gridelements V12 elevates TYPO3 by bringing grid-based layouts to content elements, with powerful features like advanced drag & drop and real references. Supercharge your workflow and make daily tasks easier. Sponsor us here:
Argument 2 passed to GridElementsTeam\Gridelements\Backend\ItemsProcFuncs\SysLanguageUidList::checkForAllowedLanguages() must be of the type int, string given #33
When trying to insert a content element into a gridelement at the first position, the following error is thrown:
Argument 2 passed to GridElementsTeam\Gridelements\Backend\ItemsProcFuncs\SysLanguageUidList::checkForAllowedLanguages() must be of the type int, string given, called in /var/www/portal/typo3conf/ext/gridelements/Classes/Backend/ItemsProcFuncs/SysLanguageUidList.php on line 42
It only happens for the first insertion point, as only then is the $params['row']['pid'] is positive at which point the if statement is true. Within lies the issue: $params['row']['tx_gridelements_container'] is a string containing a number and thus causes an exception when calling checkForAllowedLanguages, which expects it to be an integer. Casting it as int like in the if statement itself fixes the issue.
Thanks for the report - so the missing information was that it happens with CMS 10 only. On the CMS 10 testing server the error could be reproduced now.
When trying to insert a content element into a gridelement at the first position, the following error is thrown:
Argument 2 passed to GridElementsTeam\Gridelements\Backend\ItemsProcFuncs\SysLanguageUidList::checkForAllowedLanguages() must be of the type int, string given, called in /var/www/portal/typo3conf/ext/gridelements/Classes/Backend/ItemsProcFuncs/SysLanguageUidList.php on line 42
It only happens for the first insertion point, as only then is the $params['row']['pid'] is positive at which point the if statement is true. Within lies the issue: $params['row']['tx_gridelements_container'] is a string containing a number and thus causes an exception when calling checkForAllowedLanguages, which expects it to be an integer. Casting it as int like in the if statement itself fixes the issue.
Tested with Typo3 v10.4.37 and PHP 7.4
Screenshot of the error:
See pull request #32 for fix