Bug #91405
closedForm editor fails when editing FileUpload fields due to changes in how jQuery parses html with 3.5.0
0%
Description
Hey guys,
after updating to 10.4.2 the FormEditor fails when editing a form that contains a FileUpload field. The reason seems to be a change in the latest jQuery release (3.5.0, https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/).
There are partials that have self closing div elements (e.g. typo3/sysext/form/Resources/Private/Backend/Partials/FormEditor/Stage/FileUploadTemplate.html). Parsing this with jQuery has a different outcome now.
You can reproduce this in the browser console. Try running the following code in 10.4.1 and 10.4.2 backends:
$('<div class="element-content"><div data-template-property="properties.saveToFileMount" /><div data-identifier="multiValueContainer" data-template-property="properties.allowedMimeTypes"><div data-template-property="_value" /></div></div>').html()
Parsed result in 10.4.1 is:
<div data-template-property="properties.saveToFileMount"></div>
<div data-identifier="multiValueContainer" data-template-property="properties.allowedMimeTypes">
<div data-template-property="_value"></div>
</div>
Parsed result in 10.4.2 is:
<div data-template-property="properties.saveToFileMount">
<div data-identifier="multiValueContainer" data-template-property="properties.allowedMimeTypes">
<div data-template-property="_value"></div>
</div>
</div>
While processing templates and fields "properties.allowedMimeTypes" is overwritten, when updating "properties.saveToFileMount", resulting in "Invalid parameter 'key' (1475361755)".
I'd recommend updating the templates and avoiding self closing elements for non-void-elements (see https://html.spec.whatwg.org/multipage/syntax.html#start-tags).
Cheers,
Markus
Updated by Oliver Hader over 4 years ago
Please see issue #91367 which has a pending patch already...
Updated by Oliver Hader over 4 years ago
- Category set to Backend JavaScript
- TYPO3 Version changed from 10 to 9
Updated by Oliver Hader over 4 years ago
- Related to Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields added
Updated by Oliver Hader over 4 years ago
- Related to deleted (Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields)
Updated by Oliver Hader over 4 years ago
- Is duplicate of Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields added
Updated by Oliver Hader over 4 years ago
- Status changed from New to Closed
- Target version set to 9.5.18 & 10.4.3