IRRE: Selected items not removed from selector when foreign_unique is set
Selected Items are not removed from inline record selector (unique) and child record selectors.
there is a bug in t3lib/jsfunc.inline.js setUnique function. The attached patch should fix the problem.
Install attached extension (key: bug_15400).
On some page:
- insert a few "Bug 15400 record of type 2";
- insert a "Bug 15400 record of type 1" and create some relations: the used records should be removed from the selector of the parent record and from the selectors of the children records.
The same behaviour should happen when updating "Bug 15400 record of type 1":
- on expanding a child, the selector should not contain records already used in other children.
(issue imported from #M15400)
Updated by Martin Borer over 13 years ago
SNV patch request (core list):
Updated by Martin Borer about 13 years ago
Here is a better description for this problem:
If you use a IRRE Selector (see attached image). The entries in the
selectors are not removed (main Child record selector, and selectors in
child records) if you click on a item to add it.
Example of inline TCA field:
"matrix" => Array (
"config" => Array (
"type" => "inline",
"foreign_table" => "tx_adiaprodmng_matrix_rel",
"foreign_field" => "prod_id",
"foreign_selector" => "usage_id",
"foreign_sortby" => "sorting",
"foreign_label" => "usage_id",
'foreign_unique' => 'usage_id',
'appearance' => Array(
//"useCombination" => 1,
'showSynchronizationLink' => 1,
'showAllLocalizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showRemovedLocalizationRecords' => 1,
"useSortable" => 1,
'behaviour' => array(
'localizationMode' => 'select',
"maxitems" => 50,
"size" => 15,
The setUnique function was not updated for the new handling with the
Updated by Stanislas Rolland almost 13 years ago
Uploading new patchwes for this issue.
There were problems with the submitted patch. In particular when updating a parent record and its relations, and when collapseAll is set, on expanding an existing child, the selector in the child would not exclude records used in other children.
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8892
Please test this change.
When an inline field is defined as unique (foreign_unique is set), selected items are removed neither from the inline record selector, nor from the children record selectors.
Remove the used records from all selectors. Also, when updating and collapseAll is set, remove records already used from the child record after its ajax-retrieval/expansion.
How to reproduce and test:
1. Install attached extension (key: bug_15400).
2. On some page:
- insert a few "Bug 15400 Record of type 2";
- insert a "Bug 15400 Record of type 1" and create some relations:
the used records should be removed from the selector of the
parent record and from the selectors of the children records.
3. The same behaviour should happen when updating "Bug 15400 Record of
- on expanding a child, the selector should not contain records
already used in other children.