webtrees
webtrees copied to clipboard
2.0 - Manage media / Unused files same files listed in unused and local
Files are showing up in the unused category that are in fact used. In Local files I have 555 files listed. In unused files I have 555 files listed. I have checked the files in data /media and both wt_media and wt_media_files and everything seems correct.
Both wt_media and wt_media_file tables appear to be correct.
Also applies to webtrees 2.1
I am (still) completely unable to reproduce this.
Re my comment about webtrees 2.1 - my error, somehow media in my test system has become more or less duplicated,
Most tree settings have a default value. For the media folder, this is media/
.
In PHP code, we use this default when there is no value in the database.
But the "unused files" code assumes the value will be written to the database.
So PHP code runs fine, but this database query does not.
A workaround is to change the setting and then change it back. This forces an entry to be written to the database.