Bug #20659
closedTCAdefaults in Page TSConfig without effect on creating new element after existing one
0%
Description
TCAdefaults set in Page TSConfig don't have effect when creating a new element after an existing one.
This happens e.g. in list module when hitting a new button placed at some existing element or when using the "saveDocNew" button.
Reason is that the pid doesn't make it through t3lib_transferData->fetchRecord, since no translation from the "new" id takes place (new element after existing one => negative value of the existing element uid). Therefore the proper rootLine cannot be fetched and no Page TSconfig can be assigned to this to be created record. Attached patch fetches pid of the "-uid" element in that case before getting the rootline and Page TSConfig.
Page TSConfig:
TCAdefaults.tt_content.CType = textpic
1) create new tt_content as the very first element => type is textpic
2) create new tt_content after existing tt_content element => type is text (or the one set by User TSConfig)
(issue imported from #M11395)
Files