Project

General

Profile

Actions

Feature #16887

closed

Using foreign_selector on anti-symmetric intermediate table with attributes causes an empty selector

Added by Robert von Hackwitz over 17 years ago. Updated about 17 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2007-01-23
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

Description

Scenario: 2 tables with an intermediate table with attributes:
a_table
b_table
intermediate_table

In a_table and/or b_table there is a field with type'inline' and with 'foreign-selector' => 'FIELDOFINTERMEDIATETABLE'.
When editing for the first a record of a_table or b_table the selector is empty.
After choosing "Create new" (on inline field) and saving the record, selector becomes populated.

(issue imported from #M4838)


Files

T3X_testing_irre-0_0_0-z-200701241157.t3x (18.3 KB) T3X_testing_irre-0_0_0-z-200701241157.t3x Administrator Admin, 2007-01-24 12:14
irre_testing.jpg (63.4 KB) irre_testing.jpg Administrator Admin, 2007-02-01 18:33
irre_RC1_stress_2.patch (40 KB) irre_RC1_stress_2.patch Administrator Admin, 2007-02-02 17:30
irre_RC1_stress_3.patch (50 KB) irre_RC1_stress_3.patch Administrator Admin, 2007-02-03 12:05
Actions #1

Updated by Robert von Hackwitz over 17 years ago

Sorry, forgot to mention it:
Typo3 Version: TYPO3 4.1 Beta 3

Actions #2

Updated by Oliver Hader over 17 years ago

I don't know if I got this right:
The selector is empty because you don't have any affected records (of table_a or table_b) on the current page, right?
That's the normal behaviour. If no records are there, also no records can be related.

Can you please create a screenshot of you current situation and attach it to this bug-report? Are you currently using the "useCombination" behaviour (see http://wiki.typo3.org/index.php/Inline_Relational_Record_Editing_Attributes#Configure_the_combined_way)?

Actions #3

Updated by Robert von Hackwitz about 17 years ago

Thanks for your immediate reply! Mine isn't so immediate ;-)
I beg your pardon, i have to correct some things:
this seeming bug happens only when i try to extending an existing extension.
If using, for instance, T3X_irre_testsuite.t3x everything is ok.
In order to practise with IRRE i made a little extension which extends tt_address (see attached file...).
On new table ('company') side everything is ok, the field "Address" (with foreign selector) "do his job" correctly.
BUT on tt_address side the selector of the new inserted field "company" is empty and trying to "Create new" shows the error "the are no more relations ...".
Have i been making a mistake or is there a bug ?
I'm not currently using "useCombination"
Scenario:
Fresh Typo3 4.1beta3
Os: Linux
Php: 4

Actions #4

Updated by Oliver Hader about 17 years ago

I'll have a look at this next week. The "no more relations possible" warning should only appear in a uniqueness environment. So, when no new relations could be built, because all possibilities were still taken...
Whatever, I'll look at this closer next week. If you experience other problems or have more/detailed information on this issue, please do so! Thanks! ;-)

Actions #5

Updated by Oliver Hader about 17 years ago

Hm, I tried to reproduce this with tt_address 1.0.4 from TER. But when I create a new tt_address record I cannot see any field rendered that uses IRRE. Is there something else I have to do?

In your ext_tables.php I found a small mistake:
Line 62, it should be "foreign_selector" => "company"
You want to use a selector for companies I guess.

Actions #6

Updated by Robert von Hackwitz about 17 years ago

Hi Oliver,
first of all: thank you for your patience and your willingness!

Perhaps you don't see any field rendered that uses IRRE 'cause you loaded my ext first, then tt_address ? I forgot to set 'dependencies' in ext_emconf.php. So you have to load tt_address first, then my testing extension, which extends tt_address.
Really sorry for the hitch.
I've attached a screenshot of a tt_address edit form, the "company" selector is empty, but it should be filled , like on "the other side" of relation. In effect if i create a new "Company" record, the "Address" field is correctly filled.

Actions #7

Updated by Oliver Hader about 17 years ago

Okay, the extension works (in general g)
The company field on the intermediate table uses the TCA type "group/db", which is currently not supported. I'm working on a solution to get this into RC1. Because group/db will use a popup window to find records using the element browser, it's not really a "selector", but more a "simple link" ;-)

But never mind. I hope to get this finished until 3rd of February 2007...

Actions #8

Updated by Robert von Hackwitz about 17 years ago

Don't know if it can helps but: also with the company field on the intermediate table as TCA type "select", for me, it doesn't works.
I guess the problem shows when trying to extends an existing extension. Creating a totally new extension works well.

Actions #9

Updated by Oliver Hader about 17 years ago

[::bug::] Thanks for the hint on the select-type. This also depends on the loading order of extensions. The select-issue will be fixed in TYPO3 4.1-RC1.

Actions #10

Updated by Robert von Hackwitz about 17 years ago

In effect there's a little trick:
adding t3lib_div::loadTCA("tx_testingirre_address_company"); (in my little experimental extension) in ext_tables.php before:
t3lib_div::loadTCA("tt_address");
t3lib_extMgm::addTCAcolumns("tt_address",$tempColumns,1);
seems to solve!

Actions #11

Updated by Oliver Hader about 17 years ago

Yepp, thanks. Exactly the same is done in TCEforms_inline. So you don't have to do this on your own... TYPO3 does ;-)

Actions #12

Updated by Oliver Hader about 17 years ago

You can test the file irre_RC1_stress_2.patch
It implements the feature to use group/db as selector fields.

The only thing that doesn't work, is a group/db field that hasn't the role of a selector but should handle uniqueness (the problem is the new window showing the element browser).

Actions #13

Updated by Robert von Hackwitz about 17 years ago

Yeah! Great Job!!!
It seems to work fine.

Actions #14

Updated by Oliver Hader about 17 years ago

Here we go... irre_RC1_stress_3.patch
It now also supports the uniquness handling of group/db fields in an intermediate table without using the selector. Most action happens in JavaScript and the opened element browser window which delegates the checks to the parent window.

I have to do some code cleaning and after that the changes have to be reviewed by two other members of the core development team and then I hope this is ready for TYPO3 4.1!

Actions #15

Updated by Oliver Hader about 17 years ago

Committed to SVN Trunk.

Actions

Also available in: Atom PDF