evoWeb / recaptcha

TYPO3 Extension to make use of googles nocaptcha
GNU General Public License v2.0
5 stars 18 forks source link

TypoScript page.jsInline.1508480348393 array key to big for 32 bit systems #37

Closed peterkraume closed 4 years ago

peterkraume commented 4 years ago

jsInline requires the array key to be numeric. In typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php cObjGet() filters and sorts the array keys with filterAndSortByNumericKeys() and the help of MathUtility::canBeInterpretedAsInteger().

This is done by a type cast to int and a comparison with the original key. This type cast fails with numbers greater than 2147483647 on 32bit operation systems. Yes, there are still web hosting companies out there with 32bit operation systems!

This one was hard to tackle down because there is no error message. It just doesn't get rendered in the frontend although in the TypoScript Object Browser everything looks fine.

This workaround fixed the problem for me:

page.jsInline.1508480348393 >

page.jsInline.1508480348 = TEXT
page.jsInline.1508480348 {
  value = function onRecaptchaSubmit() { document.getElementById('{$plugin.tx_recaptcha.invisible_recaptcha_formname}').submit(); return false; }
  if.isTrue = {$plugin.tx_recaptcha.include_invisible_recaptcha_callback}
}