Bug #57134
closedDuplicate files results in different Metadata
0%
Description
Hello Core-Team,
we have duplicate entries in sys_file. I know, it is hard to remove them, but as long as there are duplicate entries in sys_file we should try to return always the same file.
If you have duplicate entries in sys_file goto filelist into a folder with images. In my example I see 10 images, but there are 20 records in database. As you can see, the duplicate entries were merged. This is because you're using exec_SELECTgetRows with $uidIndexField="identifier". So only the LAST found record was returned!
Please enable "extended view" and click on yellow pen to edit metadata. Add some subheader or what else and save.
Now click on the little icon in front of the image, open clickmenu, and choose edit. Now you have opened another metadata record! But why? This is because you call findOneByStorageUidAndIdentifierHash() instead and this method returns the FIRST found record.
In my opinion BOTH methods should ALWAYS return the SAME record.
Stefan