Editor looses ability to delete file relation on page if relation was created with the page record
I recently encountered a little bug. Some editors (non admin backend user with a user group and restricted page access and rights) were creating pages and added some file relations. After saving they lost the ability to delete these file relations.
Here is the original workflow:
1. Creating a page with the upper toolbar while editing another page (Hitting "new" on the "Close / Save / New / Delete" Toolbar)
2. Edit some of the available fields and add a new file relation to the media field. Now it is possible to add a title to the relation or delete it.
3. Hitting save (or just new while also saving)
After reopening the exact same page the editor is not able to delete the file relation created with the page (see screenshot relation 1). Adding new relations afterwards is working just fine (see screenshot relation 2).
I already took a look into the database and might know what the problem is. The record created in sys_file_reference, which was created with the page, misses the pid. All other fields are set correctly. This probably means that the editor can't change the relation because of missing access to pid 0.
Unfortunately I couldn't find out where the relation gets created, so I couldn't create a fix. Maybe someone knows where to look?