Bug #62001
closed[Regression] Can not add image to FAL field in Flexform
100%
Description
commit cb6b7f519b54cec0d09f46966e5a8461f13e45e5
[TASK] Replace Prototype in inline record JS
Introduced a regression that FAL fields are not working in flexform any more.
How to reproduce:
1. download and install extension:
https://forge.typo3.org/attachments/download/26263/mediacenter.zip
2. put the "mediacenter" plugin on the page
3. try to attach some images to the FAL field.
Result:
Images will not show up under the "add file" button.
Updated by Tymoteusz Motylewski about 10 years ago
seems the problem is around line 486
the patch changed line:
new Insertion.Bottom(insertObject, htmlData);
to
TYPO3.jQuery('#' + insertObject).append(htmlData);
and "insertObject" is sth like "data-52-tt_content-272-pi_flexform---data---sDEF---lDEF---settings.mediacenter---vDEF_records"
and YES, there is a div with this exact id (including the dot in the id)
the dot is comming from the field name "settings.mediacenter"
the problem is that the dot "." is interpreted differently between prototype and jquery.
prototype just passes it to "getElementById" so it's ok to have a dot.
But jquery thinks this dot is a class selector.
The solution:
Escape dot before passing it to the jquery.
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33106
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33106
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33106
Updated by Tymoteusz Motylewski about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0a578709478ede8506b7d3216f553ad80605728d.