Feature #16887
closedUsing foreign_selector on anti-symmetric intermediate table with attributes causes an empty selector
0%
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
Updated by Robert von Hackwitz almost 18 years ago
Sorry, forgot to mention it:
Typo3 Version: TYPO3 4.1 Beta 3
Updated by Oliver Hader almost 18 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)?
Updated by Robert von Hackwitz almost 18 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
Updated by Oliver Hader almost 18 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! ;-)
Updated by Oliver Hader almost 18 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.
Updated by Robert von Hackwitz almost 18 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.
Updated by Oliver Hader almost 18 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...
Updated by Robert von Hackwitz almost 18 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.
Updated by Oliver Hader almost 18 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.
Updated by Robert von Hackwitz almost 18 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!
Updated by Oliver Hader almost 18 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 ;-)
Updated by Oliver Hader almost 18 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).
Updated by Robert von Hackwitz almost 18 years ago
Yeah! Great Job!!!
It seems to work fine.
Updated by Oliver Hader almost 18 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!