[TYPO3-dev] Help with extension development - multiple languages

Morten Hagh morten at hagh.dk
Tue Nov 16 09:08:17 CET 2010


Hi again,

I have a little problem with overlays - all in all it works amazing, but I
have a problem when I am using a JOIN. 

I have a mm_relations on tx_rtmur_bricks_colorgroup_mm where uid_local is
the uid of the brick and uid_foreign is the uid of the color taken from
tx_rtmur_colorcats. Now it doesn't seem to work when I am seeing my list
view when I make a JOIN where it now show everything it can find where the
uids match regardless of the selected language. Am I doing something
completely wrong?

$join = "tx_rtmur_bricks_colorgroup_mm ON tx_rtmur_bricks.uid =
tx_rtmur_bricks_colorgroup_mm.uid_local";
$where .= "AND tx_rtmur_bricks_colorgroup_mm.uid_foreign = '". $cid ."'";

$rows = tx_overlays::getAllRecordsForTable('*', 'tx_rtmur_bricks JOIN
'.$join, $where, '', 'rtnummer');

Besides this problem, it works amazing. 

/Morten Hagh

-----Oprindelig meddelelse-----
Fra: typo3-dev-bounces at lists.typo3.org
[mailto:typo3-dev-bounces at lists.typo3.org] På vegne af François Suter
Sendt: 10. november 2010 11:20
Til: typo3-dev at lists.typo3.org
Emne: Re: [TYPO3-dev] Help with extension development - multiple languages

Hi,

> The 201 bricks are created in danish and gets uid =1 and then I create a
> data record, which is given the id 1 in the brick column, because it
relates
> to the brick that has uid=1.
> If I now create a translation in swedish of 201 it gets uid=2, but now I
> can’t get the data because it relates to uid= 1. The 110n_parent column in
> the swedish translation has id=1.

I faced a similar problem in an extension I worked on. It is not yet 
published but you can find it on Forge:

http://forge.typo3.org/projects/show/extension-checklists

It relies on a library called "overlays" which I created to ease such 
tasks (extension "overlays" is public). However the "overlays" library 
is not enough by itself, because you still need to rebuild the relations 
as you experienced.

Look at class.tx_checklists_pi1.php at around line 169 and following and 
you'll see what kind of manipulation I make to work around this issue.

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev





More information about the TYPO3-dev mailing list