Bug #82461

Story #69617: FormEngine bugs

Backend/TCA: fieldControl->addRecord removes old relations after creating an new entry in the foreign table for the new relation

Added by Dieter Porth 10 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-09-12
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3 8.7.6.: I have a problem with the addRecord-Wizard (fieldControl) in a MN-Relation.

given:
I have defined two relations.

when:
If I press the plus near the selectMulipleSideBySide-Element in the backend, I can create a new record for a new relation.

mistake:
After saving the new record, the new relation to the new record will replace the old two relations.

expected:
After saving the new record, I will see three (= one new + two old) relations.

I testet the option in fieldControl with 'append' and 'prepend' in 'setValue: in TCA
I changed variated multiple to 1

See TCA-example for Relationfield

            'study_programs' => array(
            'exclude' => 1,
            'label' => 'LLL:EXT:... study_programs',
            'config' => array(
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'foreign_table' => 'tx_..',
                'MM' => 'tx_...,
...
                'multiple' => 0,
                'fieldControl' => [
                    'editPopup' => [
                        'disabled' => false,
                        'options' => [
                            'title' => 'Edit The selected record!',
                        ],
                    ],
                    'addRecord' => [
                        'disabled' => false,
                        'renderType' => 'addRecord',
                        'options' => [
                            'title' => 'Definiere ',
                            'setValue' => 'append',
                            'pid' => '###CURRENT_PID###',
                        ],
                    ],
                ],
            ),
        ),


Related issues

Related to TYPO3 Core - Bug #81855: Add new record wizard fails on Save&Close with "select" field and MM setted Closed 2017-07-13
Related to TYPO3 Core - Bug #76863: MM Relation with selectMultipleSideBySide Field - Add wizard resets the MM Relation Resolved 2016-06-29
Duplicates TYPO3 Core - Bug #82016: Wizards add still not working with MM Closed 2017-08-01

Associated revisions

Revision 840f1275 (diff)
Added by Mathias Brodala 5 months ago

[BUGFIX] Properly append/prepend with "addRecord" wizard

For relations the internal field value contains a list of UIDs instead
of full related records.

Resolves: #82461
Releases: master, 8.7
Change-Id: Iec2a74fbc8d17636dd8751911984c337d4e99b63
Reviewed-on: https://review.typo3.org/55826
Tested-by: TYPO3com <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Markus Klein <>
Reviewed-by: Kevin Ditscheid <>
Tested-by: Kevin Ditscheid <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 98ac504a (diff)
Added by Mathias Brodala 5 months ago

[BUGFIX] Properly append/prepend with "addRecord" wizard

For relations the internal field value contains a list of UIDs instead
of full related records.

Resolves: #82461
Releases: master, 8.7
Change-Id: Iec2a74fbc8d17636dd8751911984c337d4e99b63
Reviewed-on: https://review.typo3.org/55978
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Christian Heindl 9 months ago

I can confirm that issue. Affects also TYPO3 7 LTS.

#2 Updated by Simon Praetorius 9 months ago

I can confirm this behavior as well.

#3 Updated by Michael Stopp 9 months ago

Still a problem in 8.7.8.

#4 Updated by Riccardo De Contardi 8 months ago

  • Related to Bug #81855: Add new record wizard fails on Save&Close with "select" field and MM setted added

#5 Updated by Oliver Hader 6 months ago

  • Description updated (diff)

#6 Updated by Susanne Moog 6 months ago

  • Category set to FormEngine aka TCEforms

#7 Updated by Gerrit Code Review 5 months 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/55826

#8 Updated by Mathias Brodala 5 months ago

  • Related to Bug #76863: MM Relation with selectMultipleSideBySide Field - Add wizard resets the MM Relation added

#9 Updated by Christian Kuhn 5 months ago

  • Parent task set to #69617

#10 Updated by Kevin Ditscheid 5 months ago

  • Duplicates Bug #82016: Wizards add still not working with MM added

#11 Updated by Gerrit Code Review 5 months 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/55826

#12 Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55826

#13 Updated by Gerrit Code Review 5 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55826

#14 Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55978

#15 Updated by Mathias Brodala 5 months ago

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

Also available in: Atom PDF