[TYPO3-dev] Cut and paste items, uid changes to values 8, 16, 32 etc.

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Feb 26 14:35:20 CET 2007


Brian Bendtsen wrote: on 26.02.2007 12:17:
> Ernesto Baschny [cron IT] skrev:
>> Brian Bendtsen wrote: on 26.02.2007 11:16:
>>
>>> I have made a small extension to display a list of employees. I just
>>> created 6 records in a wrong sysFolder and by cutting and pasting them
>>> into another page the uid was changed from 5,6,7,8 to 8,16,32,64. Can
>>> someone explain this?
>>
>> You probably wrongly set the "sorting" field in your TCA to "uid". The
>> "sorting" setting decides in which field TYPO3 will save the sorting you
>> will manually do in your records, which are a bunch of sorted integers
>> (stating in 2^x steps). Usually the field is called "sorting" so you set
>> "sorting" => "sorting" in your TCA. Leave it out, if you don't have a
>> "sorting" field (and set "default_sortby" => "ORDER by uid").
>>
>> Cheers,
>> Ernesto
> 
> Hi, I dont see any sorting in the file tca.php, but there is a sorting
> field in the database table. Where do I add the line: "default_sortby"
> => "ORDER by uid" you mentioned?

The "sortby" (sorry, not "sorting") field is usually defined in
ext_tables.php. This is part of the TCA for a table. Documentation about
it can be found here:

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.0.0/view/4/2/#id2810054

Cheers,
Ernesto





More information about the TYPO3-dev mailing list