[TYPO3] itemsProcFunc problem

Vincent Mans typo3.vincnet at gmail.com
Thu Aug 30 23:04:23 CEST 2007


Of course I can do this;

$row1['uid'] = $row1['title'];

before the values are put in the params items array. Then the fetched values
from the foreign table are transfered to the target table  field, nicely
comma separated.

But in the BE items field, there is still double entries (title as uid and
title as title) and in the selected field there is nothing if the titles are
selected - because no valid uid is passed back.

Am I on a wrong track? I understand it's handled in
class.t3lib_transferdata.php but have no clue now how to hook into that.
Perhaps an extension class that overrides this class? Have to be carefull
there I guess.

My question: bad idea? is there a better idea?

Thanks!

2007/8/30, Vincent Mans <typo3.vincnet at gmail.com>:
>
> Thanks Dmitry
>
>
> > Vincent Mans wrote:
> > > My first question is: can values be fetched, or are it always uids?
> > Because
> > > I need the values in the fields.
> >
> > UIDs. TYPO3 will show values (defined as 'label' in $TCA) but save UIDs.
> > This is because UIDs are unique but values are usually not.
>
>
> That's a pity. Because the fetched values don't have to be unique at all.
> It's just a value from a table with uid and value.
> And in this case, the target table gets filled from CSV-file also. We need
> values there. This makes searches on rows also easier.
>
> Perhaps there is a possibility? But "allowNonIdValues" => 1 has no
> effect...
>
>
> There are some more things. "type" is missing from your column's
> > "config" in $TCA.
> >
> > In the function:
> >
> > >>         $where = 'deleted=0 AND hidden=0';
> >
> > Hardcoding is bad. Use typo3 functions for it
> > (t3lib_BEfunc::deleteClause and ::enableFields)!
>
>
> I know, but thanks anyway for reminding. It's just for testing now, the
> "where" needs to contain something.
>
> >>             $params['items'][] = Array($row1['title']);
> >
> > Array must have two elements: first is key, second is value. See
> > examples in "TYPO3 core API".
>
>
> And this was the issue. I worked with two elements earlier, but defined
> value as first and uid as second. The order is why it didn't work. Time
> consuming stupid mistake. Thanks for your help!!
>
> --
> > Dmitry Dulepov
> > TYPO3 freelancer / TYPO3 core team member
> > Web: http://typo3bloke.net/
> > Skype: callto:liels_bugs
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.netfielders.de
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
>
>
>
> --
> Vriendelijke groet,
> Vincent Mans
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list