#92783Record inserted on wrong pid
Description
If a record is localized and then moved to another page(A), the l10n_source field of the translated record on the old page(B) points to a record on a different pid(A).
If you create a new content element after the moved item on the new page(A) and want to translate it, the translated record of the new element is inserted on the old pid(B) because TYPO3 selects the record before itself by order and then selects the localized record by l10n_source which is on the old page(B).
This can lead to strange situations if records are copied and/or moved to different pages.
In this commit, the behaviour to use the l10n_source rather than the l18n_parent was introduced:
https://github.com/TYPO3/TYPO3.CMS/commit/3c6cdaedd288a3514d48e99fe298870606769201