Bug #90331
closedf:hidden does not add identity fields
100%
Description
Hello Core-Team,
I have following relation:
club -> 1:n -> addresses -> 1:1 -> PoiCollection
In a view I want to update the latitude and longitude properties of PoiCollection record with JavaScript. So I render them with f:hidden:
<f:form.hidden class="latitude-{data.uid}" property="club.addresses.0.latitude" value="{poiCollection.latitude}" />
This field was rendered absolutely correct, but when I try to update/save the record Extbase tries to create a NEW record instead of updating it. It needs some time, but in HTML I miss the __identity lines for that properties:
<input type="hidden" name="tx_clubdirectory_clubdirectory[club][__identity]" value="9"> <input type="hidden" name="tx_clubdirectory_clubdirectory[club][addresses][0][__identity]" value="17"> <input type="hidden" name="tx_clubdirectory_clubdirectory[club][addresses][0][txMaps2Uid][__identity]" value="26">
That's because of the missing line in f:hidden VH:
$this->addAdditionalIdentityPropertiesIfNeeded();
Stefan
Updated by Gerrit Code Review almost 5 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/63177
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63177
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63456
Updated by Stefan Froemken over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 580887c240c3cac1fab95e8936d6954c24a1b5ad.