Topic on Project:Support desk

Remove file category information

4
Snow white and dwarves (talkcontribs)

In my personal wiki, an image file is listed as „Media contained in category X“ on a category cover page. I'd like to remove the media file from this category, but I can't, as the image page itself contains no category information.

What makes things even worse is that the image file is not only listed on the category page but its name is overwritten by the string „file is missing“.

Can I get rid of this through maintenance scripts or fiddling with SQL? Thanks for your help!

Bawolff (talkcontribs)

Sometimes this can happen if the title contains invalid UTF-8 (And there are two files with basically the same name but one in an invalid variant of UTF-8).

try running cleanupTitles.php.

The alternative is to try and find the page id of the image via the api, and manipulate it that way. However the maintenance script is much easier.

Snow white and dwarves (talkcontribs)

Thanks for your answer, Bawolff!

Running cleanupTitles.php renamed quite a few files in my database.

Unfortunately, the sticky media file is still on the category page. I have to try out the API way I guess… :-(

Snow white and dwarves (talkcontribs)

I finally succeeded in deleting the sticky media file by using nukePage.php with the page name "File:…" and --delete option as arguments. Yeah!

Reply to "Remove file category information"