Project

General

Profile

Actions

Bug #88472

open

Table with mm relation, unable to use ###CURRENT_PID### on relation if parent is unsaved

Added by Julian Stock almost 5 years ago. Updated over 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2019-06-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hey,

I'm using the following TCA configuration to get a mm-relation:

        // ...
        "rental_fees" => [
            "exclude" => true,
            "label" => "LLL:EXT:my_portal/Resources/Private/Language/locallang_db.xlf:tx_portal_domain_model_flat.rental_fees",
            "config" => [
                "type" => "select",
                "renderType" => "selectMultipleSideBySide",
                "foreign_table" => "tx_portal_domain_model_rentalfee",
                "foreign_table_where" => "AND {#tx_portal_domain_model_rentalfee}.{#pid} = ###CURRENT_PID### AND {#tx_portal_domain_model_rentalfee}.{#hidden} = 0 ORDER BY tx_portal_domain_model_rentalfee.startdate",
                "size" => 5,
                "MM" => "tx_portal_flat_rentalfee_mm",
                "maxitems" => 1,
                "minitems" => 1,
                "fieldControl" => [
                    "addRecord" => [
                        "disabled" => false,
                        "renderType" => "addRecord",
                        "options" => [
                            "title" => "Neuen Datensatz hinzufügen",
                            "setValue" => "append",
                            "pid" => "###CURRENT_PID###" 
                        ],
                    ],
                ]
            ],
        ],
        // ...

Everything is working fine on already saved "flats", but If I add a new one and want to add my rentalfee first, the "new to save" rentalfee isn't added to the ###CURRENT_PID###.

When checking the developer tools, it's definitely set (check the attached screenshot for information).

Thanks for reading, have a nice day.
- Julian


Files

current_pid.png (21 KB) current_pid.png Julian Stock, 2019-06-02 20:14

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #84208: TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing dataClosed2018-03-12

Actions
Actions #1

Updated by Julian Stock almost 5 years ago

When using just the default settings, it's working fine.

                // ...
                "fieldControl" => [
                    "addRecord" => [
                        "disabled" => false,
                    ],
                ]
                // ...
Actions #2

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #84208: TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing data added
Actions #3

Updated by Gone With the Wind almost 5 years ago

  • Related to Bug #84208: TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing data added
Actions #4

Updated by Gone With the Wind almost 5 years ago

  • Related to deleted (Bug #84208: TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing data)
Actions #5

Updated by Gone With the Wind almost 5 years ago

I am "suffering" from this problem, too. In a Slack chat, Benny Mack meant that this is a bug: vars like ###PAGE_TSCONFIG_ID### are simply not evaluated...

Actions #6

Updated by Christian Eßl over 4 years ago

  • Category set to FormEngine aka TCEforms
Actions

Also available in: Atom PDF