Extension talk:TitleKey
![]() Archives
| ||
---|---|---|
| ||
Removing Namespace From Results Display
My image focused wiki is a bit unusual in that I don't have any articles in the main namespace. Instead everything is in NS_FILE. As such I have $wgNamespacesToBeSearchedDefault = [NS_ARTIST => true]; and $wgContentNamespaces = [NS_FILE];
I have titlekey installed and I love that I don't need to type the prefix "File:" before every search. However, is it possible to remove the namespace prefix from the results display?
I was playing around with extensions/TitleKey/includes/TitleKey.php and I was thinking I could control it where by modifying the script at one of the two places where Title::makeTitle( $row->page_namespace, $row->page_title ); is returned, but I haven't been able to make it work. 70.160.223.43 00:44, 12 March 2025 (UTC)
Installation instructions incorrect for MW1.39?
1. I used REL1_39 even though I think REL1_42's extension.json still required only 1.39 (REL1_43 started to require 1.42). Did I make the right choice?
2. I got the error Error: Class 'MediaWiki\Extension\TitleKey\SearchEngine' not found
on search, and no search suggestions appeared. This resolved itself when I removed the line $wgSearchType = MediaWiki\Extension\TitleKey\SearchEngine::class;
from LocalSettings.php.
3. Is there anything else I should be aware of? Thanks. Jonathan3 (talk) 10:48, 25 May 2025 (UTC)
- @Jonathan3: As of phab:T377286 it sets the searchType automatically. But it hasn't been backported to 1.42. But are you saying you're using it with MW 1.39? Or using that version on a later core version? It wouldn't surprise me if the instructions are a bit wonky. :( Sam Wilson 11:26, 25 May 2025 (UTC)
- I'm using MW1.39, and branch MW1_39.
- I guess the recommended setting was wrong, and also that branch doesn't need $wgSearchType to be set.
- Sometimes it's good to use the latest branch possible, so I wondered whether REL1_40, REL1_41 or REL1/42 would be better. But REL1_39 seems to work so maybe I should just leave it. Jonathan3 (talk) 22:40, 26 May 2025 (UTC)