[Typo3-dev] Creating a wizard icon in TCA field with type user

Thomas Hempel thomas at scriptme.de
Thu Apr 21 16:34:44 CEST 2005


Markus Lange wrote:
> Thomas Hempel sagte:
> 
>>Has nobody an idea? :(
>>
>>In the last mail I forgot to say, that when the content element was saved
>>everythings works as expected.?
> 
> 
> in this case use something like notnewrecords (tca -> wizards)
> then the icon only appears if the record already have an id (saved)
> otherwise it is NEW_hash (not saved)
Unfortunately this doesn't work.

This line in the class.t3lib_tceforms.php decides if the wizard icon is displayed or not:

if (!$wConf['notNewRecords'] || t3lib_div::testInt($row['uid']))

The problem is that the testInt($row['uid']) returns the uid of the newly created content
element, because at this time it is allready created in the database. So it has an id and the
testInt method will return true.
Wether I set the "notNewRecords" to true or false, the if clause will allways be true, and so the
icon is allways drawn.

This is not happening if I use type text as field type. And so I ask if this is a bug or a
feature. If it is a feature I don't understand it... ;)

It might be that I call the renderWizards method with wrong parameters but I have no idea what
I can do else.

I think I have to affect the returnUrl so that the content element is edited when the wizard
is closed. Or I have to find a way to disable the wizard when the element is created.

I'm still interested in your opinions! :)


Greets,
Thomas




More information about the TYPO3-dev mailing list