[TYPO3-irre] Create new relation does nothing

Franz Holzinger franz at fholzinger.com
Thu May 24 19:52:22 CEST 2007


Hello Oliver,

>> I am using the almost the same as described in "Bidirectional asymmetric
>> m:n relations"
>>
>> 'appearance' => Array ('collapseAll' => TRUE, 'useCombination' => TRUE),
> 
> Is this the difference to the "bidi asym m:n relations" in the tutorial?
> The combined mode has still some difficulties mentioned at
> http://bugs.typo3.org/view.php?id=5514
> 
I am using the latest most current SVN trunk. Unfortunately I get
rejections when applying the patch. Maybe it's because there are already
some code changes inside.

 t3lib/class.t3lib_tcemain.php.rej
--- 4424,4438 ----
                                if(is_array($valueArray)) {
                                        foreach($valueArray as $key =>
$value) {
                                                if(strpos($value, 'NEW')
!== false) {
+                                                               // Fetch
the proper uid as integer for the NEW... id:
+                                                       if ($type ==
'group') {
+
$valueParts = t3lib_div::revExplode('_', $value, 2);
+
$valueParts[1] = $this->substNEWwithIDs[$valueParts[1]];
+
$valueArray[$key] = implode('_', $valueParts);
+                                                       } else {
+
$valueArray[$key] = $this->substNEWwithIDs[$value];
+                                                       }


>> In TCE I see the select box with one entry already made before. And
>> right of it the Link <Create new relation> which never works.
> 
> Maybe in this case you might want to try to patch at
> http://bugs.typo3.org/view.php?id=5564 which was also committed to
> TYPO3_4-1 and Trunk yesterday. Do you get a JavaScript error/warning?
> 
I am using this already. There is no JavaScript error or warning.
Only CSS:

Avertissement : Propriété « border-radius » inconnue.  Déclaration
abandonnée.
Fichier source : http://localhost/typo3/stylesheet.css
Ligne : 187

I could apply this patch partly. Now there is a reaction on 'Create new
relation' and it really creates a new record with some default settings
which seem to be the same what has recently entered.

>> this.data.unique is undefined. Then the selected is always set to false.
>> Maybe the function setUniqueElement should have been called before?
> 
> Yes, the selected property of the option of the selector is set to
> false. Otherwise it would not be possible to create a relation to the
> same object again - in case the no uniquness is required.
> 
>> Under the select box there is also a link. 'Neu anlegen' the same in
>> German now. This one works if clicked. Then a new relation can be entered.
>>
>> But how should the first 'create new relation' work? Should this be the
>> place to select and modify a former entry or what?
> 
> The "create new relation" wasn't yet translated to German - maybe it
> should be called "import record" or "re-use record". The "Neu anlegen"
> or "create new" is for a completely new record.

Thanks for this info. I still wonder what the 'Create new relation'
does. But maybe its because of the pach rejections.
The select box always shows the first entry. But the second record is
shown.
If you could provide a patch against SVN I will test it and give you
feedback.

- Franz





More information about the TYPO3-project-irre mailing list