Project

General

Profile

Actions

Bug #97895

open

Inline field with selector+unique: 3 problems on add

Added by Davide Alghi over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2022-07-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
backend,inline,irre,selector,unique,this_uid
Complexity:
Is Regression:
Sprint Focus:

Description

Context : backend editing, inline field with selector and "unique". M:N relation via intermediate table

Logical concept : a parent record (Parent) and a child record (Child). Each child record is held by a parent record (set by "holder" field in child record). In addition, each parent record can create a relation with other child records, except with the one held. To exclude the child held from the selector, I use "overrideChildTca" on "foreign_table_where":

"tx_mytests_domain_model_child.holder<>###THIS_UID###"

where "holder" is the parent record uid to which the child record belongs. The marker "###THIS_UID###", overwritten by "overrideChildTca", takes the value from the parent (uid of the parent).

Description : selector is correctly filtered by parent "###THIS_UID###".

A child is added to inline field, via selector: child select, in child record, contains all child records, that is to say the child records are not filtered by parent "###THIS_UID###" (first problem).
If a second child record is added, javascript removes this option from select of previous added child record (second problem).

After saving, child select, in child record, (could - depending on intermediate record uid value) becomes INVALID because "###THIS_UID###" no longer refers to the parent record but to the intermediate record (third problem).

Steps to reproduce: TCA + SQL are attached

More details in attached image details.png - screenshots from T3v10, it's the same for T3v11.


Files

ext_tables.sql (445 Bytes) ext_tables.sql Davide Alghi, 2022-07-11 14:48
details.png (490 KB) details.png Davide Alghi, 2022-07-11 14:48
tx_mytests_domain_model_child.php (2.7 KB) tx_mytests_domain_model_child.php Davide Alghi, 2022-07-11 14:48
tx_mytests_domain_model_parent.php (3.28 KB) tx_mytests_domain_model_parent.php Davide Alghi, 2022-07-11 14:48
tx_mytests_domain_model_parent2child_relation.php (2.86 KB) tx_mytests_domain_model_parent2child_relation.php Davide Alghi, 2022-07-11 14:48
Actions

Also available in: Atom PDF