The href of be-tarask: interlanguage link points to the be-x-old domain
Open, NormalPublic

Description

Steps to reproduce

  1. Open any page on Wikipedia
  2. Insert [[:be-tarask:Some test page]]
  3. Save page
  4. Open saved page and mouse over the link
  5. In web browsers there is a full link address shown in status bar at the bottom. Look on its content

Expected behavior
There should be be-tarask.wikipedia.org/wiki/Some test page

Current behavior
There actually is be-x-old.wikipedia.org/wiki/Some test page. It looks like [[:be-tarask:]] redirects to be-x-old.wikipedia.org, which redirects to be-tarask.wikipedia.org, which is unnecessary double redirect.

Amire80 created this task.Sep 8 2015, 7:59 PM
Amire80 updated the task description. (Show Details)
Amire80 raised the priority of this task from to Normal.
Amire80 added subscribers: Amire80, Krenair, Krinkle and 2 others.
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 8 2015, 7:59 PM

You're probably looking for dumpInterwiki.php in WikimediaMaintenance

Change 236929 had a related patch set uploaded (by Alex Monk):
Remove old be-tarask -> be-x-old alias

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

Regarding running a bot:
It's possible to do this but we should remove b-x-old usages wherever we see it (except in user space) instead of changing them into be-tarask, I can run a bot in userspace if you want :)

Amire80 renamed this task from The href be-tarask: interlanguage link points to the be-x-old domain to The href of be-tarask: interlanguage link points to the be-x-old domain.Sep 9 2015, 5:09 AM

Regarding running a bot:
It's possible to do this but we should remove b-x-old usages wherever we see it (except in user space) instead of changing them into be-tarask, I can run a bot in userspace if you want :)

Why remove?

I agree that if a bot happens to find a page where all the links (not just be-x-old) can be auto-migrated to Wikidata, then it should be done (except user space).

But as far as I know, some links still cannot be migrated because of conflicts and such. Wherever this happens, be-x-old should be replaced, and in user space it should be everywhere.

Change 236929 merged by jenkins-bot:
Remove old be-tarask -> be-x-old alias

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

Change 237195 had a related patch set uploaded (by Alex Monk):
Remove old be-tarask -> be-x-old alias

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

Change 237197 had a related patch set uploaded (by Alex Monk):
Remove old be-tarask -> be-x-old alias

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

Change 237197 merged by jenkins-bot:
Remove old be-tarask -> be-x-old alias

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

Change 237195 merged by jenkins-bot:
Remove old be-tarask -> be-x-old alias

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

That didn't work in production.

Everything is terrible.

jayvdb added a subscriber: jayvdb.Sep 10 2015, 3:55 AM

I was poking around at this on mw1017 last night and found that instead of removing the alias, we need to reverse it (i.e. alias in the other direction) and perform the change to the langlist. Unfortunately, there are issues with that - see T111876

Change 236966 had a related patch set uploaded (by Alex Monk):
Also update langlist for be-x-old -> be-tarask rename

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

I wrote the code and it's ready to run. Some edits for testing. Just tell me and I fire the bot for all wikis.

Krenair removed Krenair as the assignee of this task.Oct 17 2015, 5:53 PM
Restricted Application added a subscriber: JEumerus. · View Herald TranscriptApr 4 2016, 11:45 AM
Krinkle removed a subscriber: Krinkle.Apr 4 2016, 11:36 PM

Change 236966 abandoned by Brion VIBBER:
Make MediaWiki treat $lang of be_x_oldwiki as be-tarask, just don't change the real DB name

Reason:
Abandoning this in favor of a config switch that is off by default for now, same as our MP4 support. We can flip the switch, or the default state of the switch, when legal & community sign off.

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

Change 236966 restored by Brion VIBBER:
Make MediaWiki treat $lang of be_x_oldwiki as be-tarask, just don't change the real DB name

Reason:
Wrong commit sorry!

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

Dvorapa updated the task description. (Show Details)Dec 20 2017, 10:21 AM
Dvorapa added a comment.EditedJun 19 2018, 8:45 AM

What is going on here? This is a blocker for multiple tasks waiting for this to be solved...

As far as I know, the really important blocker is T114772: [Task] Implement SiteIdMapper service.

@daniel , @Lydia_Pintscher , any news about that?.. I'm trying to bring this up every few months.

Yeah, you're right, all wiki rename proposals are waiting for this and all be-x-old issues probably too.

I recalled this because time to time this makes random Pywikibot's Travis/Appveyor test fail, which is a little bit annoying (why this patch failed? did I make some mistake in unittests? ahhhh! be-x-old test went to the scene :facepalm:)

Script terminated by exception:

ERROR: SiteDefinitionError: be-tarask:Баўгарыя is not a local page on wikipedia:cs, and the interwiki prefix be-tarask is not supported by Pywikibot!
Unknown URL 'https://be-x-old.wikipedia.org/wiki/$1'.
Traceback (most recent call last):
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 5609, in parse
    newsite = self._site.interwiki(prefix)
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/site.py", line 956, in interwiki
    return self._interwikimap[prefix].site
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/site.py", line 710, in __getitem__
    raise self._iw_sites[prefix].site
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/site.py", line 673, in site
    self._site = pywikibot.Site(url=self.url)
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/__init__.py", line 1238, in Site
    code, fam = _code_fam_from_url(url)
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/__init__.py", line 1195, in _code_fam_from_url
    raise SiteDefinitionError("Unknown URL '{0}'.".format(url))
pywikibot.exceptions.SiteDefinitionError: Unknown URL 'https://be-x-old.wikipedia.org/wiki/$1'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pwb.py", line 253, in <module>
    if not main():
  File "pwb.py", line 246, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 115, in run_python_file
    main_mod.__dict__)
  File "./neexistujici-kotvy.py", line 272, in <module>
    main()
  File "./neexistujici-kotvy.py", line 258, in main
    bot.run()  # guess what it does
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/bot.py", line 1505, in run
    self.treat(page)
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/bot.py", line 1733, in treat
    self.treat_page()
  File "./neexistujici-kotvy.py", line 162, in treat_page
    if testovana_stranka.isRedirectPage():
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 811, in isRedirectPage
    return self.site.page_isredirect(self)
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 218, in site
    return self._link.site
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 5705, in site
    self.parse()
  File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 5616, in parse
    .format(self._text, self._site, prefix, e))
pywikibot.exceptions.SiteDefinitionError: be-tarask:Баўгарыя is not a local page on wikipedia:cs, and the interwiki prefix be-tarask is not supported by Pywikibot!
Unknown URL 'https://be-x-old.wikipedia.org/wiki/$1'.
CRITICAL: Closing network session.

Every single time Pywikibot will try to parse [[be-tarask:something]]