Bug #90331

f:hidden does not add identity fields

Added by Stefan Froemken over 1 year ago. Updated about 1 year 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


Related issues

Related to TYPO3.Fluid - Bug #33274: Viewhelpers extending AbstractFormFieldViewHelper should add additionalIdentityProperties even if there is an error on the fieldClosedZach Davis2012-01-18

Actions
Related to TYPO3.Fluid - Bug #29290: Additional Identity Properties not set on mapping errorResolvedBastian Waidelich2011-08-26

Actions
#1

Updated by Gerrit Code Review over 1 year 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

#2

Updated by Stefan Froemken over 1 year ago

  • Related to Bug #33274: Viewhelpers extending AbstractFormFieldViewHelper should add additionalIdentityProperties even if there is an error on the field added
#3

Updated by Stefan Froemken over 1 year ago

  • Related to Bug #29290: Additional Identity Properties not set on mapping error added
#4

Updated by Gerrit Code Review over 1 year 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

#5

Updated by Gerrit Code Review about 1 year 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

#6

Updated by Stefan Froemken about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF