Project

General

Profile

Actions

Bug #21102

closed

IRRE: Selected items not removed from selector when foreign_unique is set

Added by Martin Borer over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-08-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi there,

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)


Files

irre_15400_rev8536.patch (3.41 KB) irre_15400_rev8536.patch Administrator Admin, 2010-08-19 19:09
attachment-0001.png (27.5 KB) attachment-0001.png Administrator Admin, 2010-09-21 22:04
typo3core_bugfix_15400_trunk.patch (6.84 KB) typo3core_bugfix_15400_trunk.patch Administrator Admin, 2011-01-11 22:50
typo3core_bugfix_15400_typo3_4-4.patch (6.74 KB) typo3core_bugfix_15400_typo3_4-4.patch Administrator Admin, 2011-01-11 22:50
T3X_bug_15400-0_0_0-z-201101111640.t3x (2.66 KB) T3X_bug_15400-0_0_0-z-201101111640.t3x Administrator Admin, 2011-01-11 22:53

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #21934: some bugfixes for IRRE (Localisazion + Selector + Encoding)ClosedSteffen Gebert2010-08-06

Actions
Related to TYPO3 Core - Bug #23734: Multiple problems with using combinations of foreign_selector, foreign_unique and useCombinationClosed2010-10-14

Actions
Actions #1

Updated by Martin Borer over 14 years ago

Uploaded patch...

SNV patch request (core list):
http://lists.typo3.org/pipermail/typo3-team-core/2010-August/041940.html

Actions #2

Updated by Martin Borer over 14 years ago

patch was missing, sorry.

Uploaded patch irre_15400_rev8536.patch

Actions #3

Updated by Martin Borer about 14 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 (
"label" =>
"LLL:EXT:adia_prodmng/locallang_db.xml:tx_adiaprodmng_products.matrix",
"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
scriptaculous javascript framework.

Actions #4

Updated by Philipp Kerling about 14 years ago

I can confirm that the patch works as expected.

Actions #5

Updated by Stanislas Rolland almost 14 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.

Actions #6

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.4.7)
Actions #7

Updated by Martin Borer over 13 years ago

some progress here?
Is the patch ready for the next Typo3 4.5.x release?
Would be great if this could be fixed in the next release, we have to use an old patched 4.4 release for our projects now...

Actions #8

Updated by Gerrit Code Review almost 13 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8892

Actions #9

Updated by Stanislas Rolland almost 13 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.

Problem:
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.

Solution:
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
type 1":
- on expanding a child, the selector should not contain records
already used in other children.

Actions #10

Updated by Gerrit Code Review almost 13 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/8955

Actions #11

Updated by Gerrit Code Review almost 13 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/8956

Actions #12

Updated by Stanislas Rolland almost 13 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF