[TYPO3-mvc] Overwriting TCA (fe_users)
Florian Staudacher
florian_staudacher at yahoo.de
Fri Jul 16 15:36:42 CEST 2010
Am Freitag, 16. Juli 2010, 12:48:32 schrieb Lang, Patrik:
> OK, found it!
>
> You have several errors in your tca!
>
> 1. In ext_tables.php you have the fields configured without the prefix
> "tx_whoozshop_" but in the table they have it. And you have specified a
> MM_opposite_field which isn't present. from
>
> 'watchlist' => array(
> 'exclude' => 0,
> 'label' =>
> 'LLL:EXT:whooz_shop/Resources/Private/Language/locallang.xml:tx_whoozshop_
> domain_model_customer.watchlist', 'config' => array(
> 'type' => 'select',
> 'size' => 10,
> 'minitems' => 0,
> 'maxitems' => 99999,
> 'autoSizeMax' => 30,
> 'multiple' => 1,
> 'default' => 0,
> 'foreign_table' =>
> 'tx_whoozshop_domain_model_product', 'MM' =>
> 'tx_whoozshop_customer_product_mm', 'MM_opposite_field' => 'watched',
> )
> ),
>
> you have to make:
>
> 'tx_whoozshop_watchlist' => array(
> 'exclude' => 0,
> 'label' =>
> 'LLL:EXT:whooz_shop/Resources/Private/Language/locallang.xml:tx_whoozshop_
> domain_model_customer.watchlist', 'config' => array(
> 'type' => 'select',
> 'size' => 10,
> 'minitems' => 0,
> 'maxitems' => 99999,
> 'autoSizeMax' => 30,
> 'multiple' => 1,
> 'default' => 0,
> 'foreign_table' =>
> 'tx_whoozshop_domain_model_product', 'MM' =>
> 'tx_whoozshop_customer_product_mm', 'MM_opposite_field' => 'uid_foreign',
> )
> ),
>
> in the mm table is no field "watched"
>
> And in your tca in folder TCA, file Product.php
>
> You should enter the opposite_field too so from
>
> 'watched' => array(
> 'exclude' => 0,
> 'label' =>
> 'LLL:EXT:whooz_shop/Resources/Private/Language/locallang.xml:tx_whoozshop_
> domain_model_product.watchedBy', 'config' => array(
> 'type' => 'select',
> 'size' => 10,
> 'minitems' => 0,
> 'maxitems' => 99999,
> 'autoSizeMax' => 30,
> 'multiple' => 1,
> 'foreign_table' => 'fe_users',
> 'MM' => 'tx_whoozshop_customer_product_mm',
> ),
> ),
>
> to
>
> 'watched' => array(
> 'exclude' => 0,
> 'label' =>
> 'LLL:EXT:whooz_shop/Resources/Private/Language/locallang.xml:tx_whoozshop_
> domain_model_product.watchedBy', 'config' => array(
> 'type' => 'select',
> 'size' => 10,
> 'minitems' => 0,
> 'maxitems' => 99999,
> 'autoSizeMax' => 30,
> 'multiple' => 1,
> 'foreign_table' => 'fe_users',
> 'MM' => 'tx_whoozshop_customer_product_mm',
> 'MM_opposite_field' => 'uid_local',
> ),
> ),
>
> That should fix the problem.
>
> Greets
> Patrik
>
Thank you so much! Now it works exactly as thought, and I could broaden my
knowledge of how the TCA works!
Thanks again,
Florian
More information about the TYPO3-project-typo3v4mvc
mailing list