[TYPO3-mvc] Translation handling a bit too strict?
Andreas Kiessling
kiessling at pluspol.info
Wed May 12 16:50:41 CEST 2010
One more thing about handling of translations:
In combination with DAM, i stumbled upon another problem. The DAM record
is configured in TCA with
'img_name' => txdam_getMediaTCA('image_field', 'img_name'),
additional config for the field:
$TCA['xyz']['columns']['img_name']['label'] =
'LLL:EXT:.../locallang_db.xml:xyz.img_name';
$TCA['xyz']['columns']['img_name']['config']['size'] = 1;
$TCA['xyz']['columns']['img_name']['config']['max_items'] = 1;
#needed for extbase
$TCA['xyz']['columns']['img_name']['config']['foreign_table'] = 'tx_dam';
#needed because prepend_tname is not supported
$TCA['xyz']['columns']['img_name']['config']['MM_match_fields']['tablenames']
= 'xyz';
The model from xyz table is then connected to a very basic DAM model and
the generated query from extbase looks like this:
SELECT tx_dam.* FROM tx_dam_mm_ref LEFT JOIN tx_dam ON
tx_dam_mm_ref.uid_local = tx_dam.uid WHERE ((tx_dam_mm_ref.uid_foreign =
'1' AND tx_dam_mm_ref.ident = 'image') AND tx_dam_mm_ref.tablenames =
'xyz') ORDER BY tx_dam_mm_ref.sorting_foreign ASC
This returns the right record, but fails to do the translation overlay,
because "$query->getSource()" returns tx_dam_mm_ref, and not tx_dam
Do i have a misconfiguration here?
If it would work, than the setting for fetching language overlays needed
to be configurable, because a DAM record cannot be set to -1 / all and
so wouldn't return a record, if it is not "translated". This is
certainly the desired behavior for most of the extensions, but here it
complicates the handling of assets.
Any hints on how to deal with that? I searched the mailing-list and
bugtracker, but didn't find any hints about it.
Regards,
Andreas
More information about the TYPO3-project-typo3v4mvc
mailing list