Issue Bug Closed

#90331f:hidden does not add identity fields

Stefan Froemken 02/05/20, 15:21 updated 04/01/20, 21:14

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 class="latitude-{data.uid}" property="club.addresses.0.latitude" value="{poiCollection.latitude}"></f:form>

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

Reviews 2