Error "[1.3.-1]: Attempt to delete record without delete-permissions" if editors delete complete pages
TYPO3 8.7 with gridelements 8.0.0
If editors (with full access rights to all fields in all tables) are deleting pages (e.g. via drag and drop in page tree) it may happen, that there are AJAX-error-messages that they have not the right to delete content elements.
Image (with a debug output of uid and tablename - done in Web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:5194):
I debugged through gridelements and it turns out that the four content elements that could not be deleted are simple CE and children of a grid container. Digging deeper leads to Web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:5190 where TYPO3 checks for permissions. Debugging \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::recordEditAccessInternals() in line 757 shows that the row is empty - so the children content elements are already deleted when it comes to deletion.
The error does not occur for admins because the check returns true in line 750.
Idea: Maybe TYPO3 delete the container and the children elements at first and after that T3 tries to delete a children again - which leads to the error message.
My question: How is the ordering of deleting content elements in a page? If TYPO3 would delete children first or simply not, the error would be gone.
Note: We have a lot of old records in our database. Maybe there is a problem with a wrong sorting?