Page MenuHomePhabricator

enable MediaSearch extension on ptwikinews
Closed, ResolvedPublic

Description

Enable the MediaSearch extension in Portuguese Wikinews. Wikinews is organized into categories, just like Wikimedia Commons, so the extension is ideal for the project.

(local discussion)

Event Timeline

Change 788803 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] ptwikinews: Enable extension MediaSearch

https://gerrit.wikimedia.org/r/788803

Stang subscribed.
Stang unsubscribed.

Change 788812 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] id_internalwikimedia: Enable extension UploadWizard

https://gerrit.wikimedia.org/r/788812

...Sorry for the wrong task!

Hi @Edu! Extension description mentioned a variable $wgMediaSearchExternalSearchUri which controls what API to use for searching via MediaSearch. Do you want to use commons api at here? Since there seems no local file on ptwikinews.

'wgMediaSearchExternalSearchUri' => [
	'default' => 'https://commons.wikimedia.org/w/api.php',
],

Hi @Stang! Yes, it currently only has three local files. Thank you so much for working on this task.

'wgMediaSearchExternalSearchUri' => [
	'default' => 'https://commons.wikimedia.org/w/api.php',
],

FYI: changing this would affect not only media, but all search results (incl. pages & categories) - they would all start to return results from Commons.

Change 788803 merged by jenkins-bot:

[operations/mediawiki-config@master] ptwikinews: Enable extension MediaSearch

https://gerrit.wikimedia.org/r/788803

Change 788863 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/mediawiki-config@master] Revert "ptwikinews: Enable extension MediaSearch"

https://gerrit.wikimedia.org/r/788863

Change 788863 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "ptwikinews: Enable extension MediaSearch"

https://gerrit.wikimedia.org/r/788863

Patch reverted as MediaSearch extension failed to solve problem addressed in this task "Wikinews is organized into categories, so this extension will help". Actually, if enable this extension, MediaSearch will become the default search option, and as we explicitly set variable wgMediaSearchExternalSearchUri, it will only return media files on Wikimedia Commons (like the following screenshot if you search "Cat" in the top right inputbox)

image.png (974×1 px, 625 KB)

Although user could change which search method to use in their preference, I don't think this is a useful function, as this brings no benefit to user when searching news on ptwikinews.

@Stang: The order of the tabs must be changed. "Categories and pages" should be the first. See: T284208 by @Seddon

An example of how the extension is useful:

  • The Joe Biden category has more than 300 news stories about the US president.
  • If one searches for "Joe Biden" they will find hundreds of pages, but not the category.

Because of this, Wikinews users have to create hundreds of redirects. Joe Biden → Categoria:Joe Biden

Dig into extension.json and I found change the tab order is indeed possible, and there's no need to set variable wgMediaSearchExternalSearchUri here. I will submit another patch for that.

image.png (290×1 px, 28 KB)

@Edu, so just to confirm, for the order of those tabs, "Categories and pages" should be place at the first position, and the rest tabs are kept unchanged. Is that correct?

Change 791752 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] ptwikinews: Enable extension MediaSearch

https://gerrit.wikimedia.org/r/791752

Change 791752 merged by jenkins-bot:

[operations/mediawiki-config@master] ptwikinews: Enable extension MediaSearch

https://gerrit.wikimedia.org/r/791752

Mentioned in SAL (#wikimedia-operations) [2022-05-16T07:49:04Z] <urbanecm@deploy1002> Synchronized wmf-config/InitialiseSettings.php: dc82dfa8: ptwikinews: Enable extension MediaSearch (T299872) (duration: 00m 48s)