Page MenuHomePhabricator

When viewing pages for non-Incubator pages on Incubator, the link to the page on the new wiki is broken
Closed, ResolvedPublicBUG REPORT

Description

See e.g. https://incubator.wikimedia.org/w/index.php?title=Category:Wp/ady/%D0%90%D0%B4%D1%8B%D0%B3%D1%8D_%D0%A0%D0%B5%D1%81%D0%BF%D1%83%D0%B1%D0%BB%D0%B8%D0%BA%D1%8D%D0%BC_%D0%B8_%D0%BF%D1%81%D1%8B%D1%85%D1%8D%D1%80&action=edit "This wiki already exists. You can find this page on [/wiki/Category:Адыгэ_Республикэм_и_псыхэр wiki/Category:Адыгэ_Республикэм_и_псыхэр]. If the wiki was recently created, please wait a few hours or days until all content is imported." (The message is wminc-error-wiki-exists).

Example: https://incubator.wikimedia.org/wiki/Wp/war/MediaWiki:Common.js

<div class="wminc-wiki-exists">This wiki already exists. You can find this page on <a class="external" rel="nofollow" href="/wiki/MediaWiki:Common.js">wiki/MediaWiki:Common.js</a>. If the wiki was recently created, please wait a few hours or days until all content is imported.</div>

Event Timeline

MF-Warburg raised the priority of this task from to Needs Triage.
MF-Warburg updated the task description. (Show Details)
MF-Warburg subscribed.

This is an issue that occurs only for Wikipedias and not other projects. Must be something wrong with our handling of Wikipedias as the recent few bugs seems to be closely related.

Krinkle renamed this task from When trying to edit pages of ex-test-wikis on Incubator, the link to the page on the new wiki is broken to When viewing pages for non-Incubator pages on Incubator, the link to the page on the new wiki is broken .May 24 2016, 7:41 PM
Krinkle updated the task description. (Show Details)
Krinkle subscribed.

It's due to it making a relative link instead of an absolute link. It needs to specify the domain as otherwise it'll point to the main incubator wiki instead.

It seems to me that the getSubdomain function in the WikimediaIncubator class is broken. I am not sure if $wgConf is even declared by the time the extension is loaded.

How can we solve this? As it works for non-Wikipedias, can't we create an exception for Wikipedias that will fix the link for them?

Change 794768 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/WikimediaIncubator@master] [WIP] Refactor and consolidate settings

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

jhsoby changed the subtype of this task from "Task" to "Bug Report".May 24 2022, 5:54 PM

Change 794768 merged by jenkins-bot:

[mediawiki/extensions/WikimediaIncubator@master] Refactor and consolidate config

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

jhsoby claimed this task.

Fixed; confirmed in Beta Incubator, will be deployed to the real Incubator next week.