Project

General

Profile

Actions

Bug #91405

closed

Form editor fails when editing FileUpload fields due to changes in how jQuery parses html with 3.5.0

Added by Markus Scholz almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
Start date:
2020-05-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #91367: TYPO3 9.5.17 error with ext:form and upload fieldsClosed2020-05-12

Actions
Actions #1

Updated by Oliver Hader almost 4 years ago

Please see issue #91367 which has a pending patch already...

Actions #2

Updated by Oliver Hader almost 4 years ago

  • Category set to Backend JavaScript
  • TYPO3 Version changed from 10 to 9
Actions #3

Updated by Oliver Hader almost 4 years ago

  • Related to Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields added
Actions #4

Updated by Oliver Hader almost 4 years ago

  • Related to deleted (Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields)
Actions #5

Updated by Oliver Hader almost 4 years ago

  • Is duplicate of Bug #91367: TYPO3 9.5.17 error with ext:form and upload fields added
Actions #6

Updated by Oliver Hader almost 4 years ago

  • Status changed from New to Closed
  • Target version set to 9.5.18 & 10.4.3
Actions

Also available in: Atom PDF