Topic on Extension talk:Replace Text

Somewhat misleading feedback (category filter)

4
MvGulik (talkcontribs)

Somewhat minor, but which could be a bit less ambiguous.

When the "Replace only in category" filter is used. And Replace-Text can't find the target string in any of the pages listed in the targeted category. It comes back with: No category exists with the name "Category:<+name>".

Technically:
1) Replace-Text just could not find any page that matched the search string.
2) Categories are of course a bit tricky. As they can exist as a page, but still be empty. Or they can contain pages, without actually having some page-content set.

Something like No matching pages found in/for the "Category:<+name>" seem a better feedback text for these cases.

Replace Text: 1.7 (8e35c8f) 19:50, 4 December 2022
MediaWiki: 1.39.0
Cavila (talkcontribs)

> Or they can contain pages, without actually having some page-content set.

Is that the issue in your case? This seems to check if the category exists as a wiki page and if it doesn't, throws the error message you mentioned.

MvGulik (talkcontribs)

Mmm ... will have think a bit, and explore that code.

MvGulik (talkcontribs)

Although I'm not familiar with PHP ... other than a quick PHP crash-course at w3schools. The related code seems ok as far as I can tell.

The only thing that I could not figure out is what that exists() part in line 280 is doing. It seems not a PHP native function, but I also could not find any reverence to it in the other ReplaceText codes on Github.

Considering the output I got, and the fact that the used category has pages linked to it and also a content-page. A failing category-detection at line 280 would kinda explain that result.

+(The used category also has no special name)

Reply to "Somewhat misleading feedback (category filter)"