requestUpdate doesn't work if fields are separated by a space
I set my TCA like:
$TCA['table']['ctrl']['requestUpdate'] = 'field1, field2';
If I change the value of 'field1' in BE, a reload is requested. If I change the value of 'field2' in BE, there's no reload requested. I expect a reload request in this case too.
I noticed that if I remove the space between the fields, it works.
$TCA['table']['ctrl']['requestUpdate'] = 'field1,field2';
Updated by Francois Suter almost 8 years ago
- Status changed from New to Accepted
- Assignee set to Francois Suter
- Target version set to next-patchlevel
Indeed, this is due to \TYPO3\CMS\Core\Utility\GeneralUtility::inList() not tolerating spaces. The behaviour of that method cannot be changed easily for fear of breaking existing uses or of hurting performance (this method is used very widely). After discussion in the core mailing list, a good solution seems to be to remove spaces from "requestUpdate" upon handling it, since no spaces can be expected in that place.
I'll prepare a patch for this.