Project

General

Profile

Actions

Bug #90331

closed

f:hidden does not add identity fields

Added by Stefan Froemken about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
Fluid
Target version:
Start date:
2020-02-05
Due date:
% Done:

100%

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

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

Actions

Also available in: Atom PDF