Problems working with pages table and pid
in my scenario I have to import categories and sub-categories from an external source (MSSQL) and convert them in the related pages and sub-pages.
I found 2 bugs in this scenario and I provided a patch.
Since there are already pages in this TYPO3 installation, there is a small problem because these already existing records (pages) have no reference with the external source. Their reference_uid = '0'.
These not referenced pages must survive the external source import and I can't disable delete operations because I need that future external deletions will be mirrored.
A simple check in getExistingUids() and getMapping() should solve the problem. (see attached patch)
Since I need that sub-categories and their parents will match sub-pages and their parents pages, I have to work with "pid" column in external informations. But $theRecord['pid'] is overwritten in function "storeData" by $this->pid.
Same here, a simple check should fix the bug. (see attached patch).
I hope that this helps and thanks a lot for the amazing "Tesseract Project" :)