webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

2.0 - Manage media / Unused files same files listed in unused and local

Open makitso opened this issue 5 years ago • 6 comments

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.

makitso avatar Mar 22 '19 00:03 makitso

Both wt_media and wt_media_file tables appear to be correct.

image

makitso avatar Apr 21 '19 23:04 makitso

image

image

makitso avatar Apr 21 '19 23:04 makitso

Also applies to webtrees 2.1

ddrury avatar May 03 '22 13:05 ddrury

I am (still) completely unable to reproduce this.

fisharebest avatar May 04 '22 20:05 fisharebest

Re my comment about webtrees 2.1 - my error, somehow media in my test system has become more or less duplicated,

ddrury avatar May 05 '22 08:05 ddrury

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.

fisharebest avatar Jun 07 '22 21:06 fisharebest