Project

General

Profile

Actions

Bug #84232

closed

How to use ###PAGE_TSCONFIG_UID### with the fieldControls's "addRecord" in TCA?

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

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Documentation
Start date:
2018-03-13
Due date:
% Done:

0%

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

Description

Neither the core nor the documentation (and so far my google search would lead me to even say: not even Google) offer a good example on how to use markers with "addRecord" in the TCA.

The situation is the following:

Each of the 2 tables - be it "category" and "book" - have a field, that relate to each other via m:m. The objects themselves have their own storagePid (and therefore folder page), where they store their data. "Category" as well as "Book" display their m:m-relation as a "selectMultipleSideBySide" select field, by which the records form "the other side" can be managed.

It makes sense to add an "addRecord" button to the fieldControl parameter, so I can add a "category" record, when I am in the "Book" form and vice versa. In order to save the record "from the other side" to its proper storagePid (folder page), the TCA requires the use of a marker like ###PAGE_TSCONFIG_UID###. The documentation does not clearly explain, how this is done, and so far it does not seem to work.

Documentation on "addRecord" within a "multipleSideBySide" renderType:
https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Select.html#addrecord

As soon as "addRecord.pid" gets assign a hardcoded value, everything works as expected - with the very disturbing side effect that, upon saving, any and every data that was already selected, will be removed. This will be an extra entry, as soon as I get the markers working.


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

Also available in: Atom PDF