Project

General

Profile

Actions

Bug #84208

closed

TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing data

Added by Gone With the Wind about 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2018-03-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
TCA, addRecord, selectMultipleSideBySide
Complexity:
Is Regression:
Sprint Focus:

Description

Let's assume a TCA has a configuration like this:

'config' => [
  'type' => 'select',
  'renderType' => 'selectMultipleSideBySide',
  [..],
  'fieldControl' => [
     'addRecord' => [
       'disabled' => true,
       'options' => [
         'pid' => '9', //hardcoded!

[...]

On clicking the "addRecord" button, a new record can be created, which will be saved on a page with uid 9. Saving and closing leads back to the original form and fills the select list with the new record - REMOVING any other that might have already existed.

The expected behaviour would be to add the new record to the existing record.

(I would have liked to assign this issue to TCA, but the category list does not offer such a category. Therefore I assign it to FormFramework - unsure if this is the right place.)

PS: there are no examples in the documentation on how to create entries for markers that can be used with addRecord.
PPS: It is mentioned that markers can be defined in PageTS (again: example missing), but wouldn't it be better to fetch a marker from the setup.ts? Defining folder ids, where records may/must be created, in 2 possible places (setup.ts and pagets) seems double the trouble...


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #82461: Backend/TCA: fieldControl->addRecord removes old relations after creating an new entry in the foreign table for the new relation Closed2017-09-12

Actions
Related to TYPO3 Core - Bug #88472: Table with mm relation, unable to use ###CURRENT_PID### on relation if parent is unsavedNew2019-06-02

Actions
Related to TYPO3 Core - Bug #84232: How to use ###PAGE_TSCONFIG_UID### with the fieldControls's "addRecord" in TCA?Closed2018-03-13

Actions
Actions #1

Updated by Ralf Zimmermann about 6 years ago

  • Category changed from Form Framework to FormEngine aka TCEforms
Actions #2

Updated by Benni Mack about 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #3

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #82461: Backend/TCA: fieldControl->addRecord removes old relations after creating an new entry in the foreign table for the new relation added
Actions #4

Updated by Gone With the Wind almost 5 years ago

I think this was resolved by #82461. A test today showed, that existing records are NOT deleted anymore.
IMO, this ticket can be closed.

Actions #5

Updated by Gone With the Wind almost 5 years ago

The current issue is still valid as the configuration of a ###PAGE_TSCONFIG_PID### or any other in the "addRecord" section does not do anything. Meaning: If a new record is edited by clicking on the relevant button in the multiSelectSideBySide box, the new record is saved on the SAME page instead of on the page with the pid ###PAGE_TSCONFIG_PID###.

Actions #6

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #88472: Table with mm relation, unable to use ###CURRENT_PID### on relation if parent is unsaved added
Actions #7

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #88472: Table with mm relation, unable to use ###CURRENT_PID### on relation if parent is unsaved added
Actions #8

Updated by Gone With the Wind almost 5 years ago

  • Related to deleted (Bug #88472: Table with mm relation, unable to use ###CURRENT_PID### on relation if parent is unsaved)
Actions #9

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #84232: How to use ###PAGE_TSCONFIG_UID### with the fieldControls's "addRecord" in TCA? added
Actions #10

Updated by Benni Mack almost 5 years ago

  • Status changed from New to Closed

Issue closed on behalf of the Robert Wildling and Daniel Siepmann. Documentation will be updated accordingly.

Actions

Also available in: Atom PDF