#108850File relation inside other file relation leads to initially not rendered "Add file" button
Description
After an upgrade from TYPO3 12 to 13 we noticed that a custom TCA file relation inside sys_file_reference was not properly rendered (use case: preview image for a video). The field itself is basically present and rendered: title, description and the allowed file types are correctly rendered – but inbetween the “add file” button is just missing. When saving the whole surrounding content element the button appears, however.
Up until now this is just a nuisance (which can be explained in the description of the field to an editor), but it gets a serious problem if the field should be mandatory, e.g. 'minitems' => 1, because then you can not save the surrounding CE to make the button appear. I tried with different TCA configs: minitems, maxitems set or unset, set to 1 or 0 or PHP_INT_MAX – beahviour does not change: button is only rendered after the “parent” file reference is persisted.
This seems to be an issue on the Backend JavaScript framework, which evaluates all the inline relations rendering conditions whe nadding a new file relation. Browser console does not show any problems. The fact that the button is shown after saving the CE (which is an actual new server response with the then already available “parent” sys_file_reference record) also hints at a JS problem.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.