Bug #15679
closedt3lib_befunc::getTSconfig_pidValue() allways returns wrong pid or error-code
0%
Description
If a record in a workspace is created by "auto-versioning when edit" its stored on pid -1.
t3lib_befunc::getTSconfig_pidValue() takes abs($thePidValue) as uid to find the real PID. Therefore it allways returns the pid of the record with uid 1 from the requested table - as long as the record exists: If that record gets the deleted-flag set, the function will return "-2" as an errorcode.
As one result there are no RTE´s in content-elements created by auto-versioning if you delete tt_content_1.
since t3lib_befunc cant be xclassed there is no chance to fix this without editing the file directly - so i think this issue is really severe.
(issue imported from #M2639)
Updated by Martin Kutschker over 18 years ago
Kasper, could you have a look on this one? I'm not ready to work on workspace isses yet.
Updated by Kasper Skårhøj over 18 years ago
Hi Peter,
Found problem. The right thing to do is to input a correct PID to the mentioned function. So I have added that note to the functions header - that the PID must only be negative if pointing to another record from same table. I have also fixed all places in core I could find that potentially inputted the "-1" pid from offline records and fixed it by calling t3lib_BEfunc::fixVersioningPid($table,$row); just before.