Additional __identity field when using TYPO3.Media
|Priority:||Must have||Due date:|
|Assignee:||Bastian Waidelich||% Done:||
|Target version:||TYPO3 Flow Base Distribution - 1.1.2||Estimated time:||0.50 hour|
|Has patch:||No||FLOW3 version affected:||FLOW3 1.1.0 beta 1|
When using a <f:form.upload /> field for uploading a TYPO3.Media Image, FLUID adds a hidden _identity field for the Image which results in an "_identity mapping is not allowed" exception when saving the record. Removing the hidden __identity field by deleting
$content .= $this->renderAdditionalIdentityFields();
from FormViewHelper.php on line 127 solves the particular problem. Some further if / else conditions are needed.
Updated by Sebastian Kurfuerst about 1 year ago
- Status changed from New to Accepted
- Assignee set to Sebastian Kurfuerst
I'll take care of that; the solution you proposed is just a workaround unfortunately.
Updated by Bastian Waidelich 12 months ago
- Status changed from Accepted to Needs Feedback
- Assignee changed from Sebastian Kurfuerst to Bastian Waidelich
This should be fixed with https://review.typo3.org/#/c/12221/
Can you please confirm?
Updated by Michel Albers 11 months ago
Still getting the error "it's not allowed to map property __identity" when submitting the upload form with a previously set value. Sorry :/
Updated by Martin Keck 11 months ago
Two remarks from my point of view (using 1.1 rc2 and TYPO3.Media) to probably make things clearer:
1. The problem only emerges when editing/updating an existing content (or whatever element) having a TYPO3.Media image as property (i. e. in newly created form there's no _identity hidden field for the image created)
2. I can confirm Michel's comment, that the suggested patch does not change anything (it's already part of rc2). The hidden field's still there, e. g. <input type="hidden" name="content[image][_identity]" value="11db8fa6-71ad-4f89-a0d3-e75c4c545412" />. Removing it from the HTML output before submitting the form leads to a correctly updated image.