[TYPO3-mvc] Localisation of related objects [SOLVED]

Henjo Hoeksma me at henjohoeksma.nl
Sat Nov 12 23:41:46 CET 2011


These lines were bugging of course:

'foreign_table_where' => 'AND
tx_hhorganization_domain_model_position.sys_language_uid=###REC_FIELD_sys_language_uid###',
'localizeReferencesAtParentLocalization' => TRUE,


The last line had to go. The first line should have been IN (-1,0) instead
of the REC_FIELD.
Also I added a 'localizationMode' => 'keep' to the inline relations.


All good now.

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Sat, Nov 12, 2011 at 18:45, Henjo Hoeksma <me at henjohoeksma.nl> wrote:

> Hi list,
>
> I am wondering what goes wrong with an extension I am creating. Everything
> works well in the default language, but when localizing an object the
> related objects can't be found.
>
> For example I have a person (object) with a relation to a position
> (object). (1:1)
>
> Localizing in the backend shows me in the BE form the localized object
> with the localized person and the localized position in it's respective
> selector.
>
> When viewing the person in the Frontend I find the person and put it in
> showmode. I do not see the the position though... Worse: I get an error
> "Call to a member function __toString() on a non-object"
>
> This is a snippet of my TCA:
>
> 'config' => array(
> 'type' => 'select',
>  'suppress_icons' => 1,
> 'foreign_table' => 'tx_hhorganization_domain_model_position',
>  'foreign_table_where' => 'AND
> tx_hhorganization_domain_model_position.sys_language_uid=###REC_FIELD_sys_language_uid###',
> 'localizeReferencesAtParentLocalization' => TRUE,
>  'minitems' => 0,
> 'maxitems' => 1,
> 'items' => array(
>  array('', 0),
> ),
> ),
>
> I have never had this before with other extensions. I am kinda puzzled.
>
> Anyone a clue?
>
> BTW it's related to another thread I started ("Localizing inline relations
> with additional objects") but is different.
>
> Kind regards,
>
> Henjo
>
> Problems are small because we learned how to deal with them.
> Problems are big because we need to learn how to deal with them.
>


More information about the TYPO3-project-typo3v4mvc mailing list