Page MenuHomePhabricator

Family.from_url() fails if multiple sites have different paths but same domain
Open, HighPublicBUG REPORT

Description

wowwiki is a SubdomainFamily. After moving the domain from wikia.com to fandom.com all sites has the same domain wowwiki.fandom.com and but the paths are different like

  • wowwiki.fandom.com/de
  • wowwiki.fandom.com/fr

using the script path.

Family.from_URL() doesn't work in this case because self._hostname(code)[1] == parsed.netloc always match for different sites and the method fails.

See family_tests.TestFamilyUrlRegex.test_each_family
https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose-docker/5341/console

Event Timeline

Xqt created this task.Feb 1 2019, 8:05 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptFeb 1 2019, 8:05 PM
Xqt triaged this task as Medium priority.Feb 1 2019, 8:05 PM
Xqt raised the priority of this task from Medium to High.Feb 1 2019, 8:13 PM
Xqt added a comment.Feb 1 2019, 8:28 PM

Looks like a good candidate for tests

Dvorapa added a subscriber: Dvorapa.Feb 9 2019, 5:51 AM
Xqt added a comment.Apr 14 2019, 7:05 PM

Same for lyricwiki which now has 'en' and 'ru' subdomains.

Xqt changed the subtype of this task from "Task" to "Bug Report".Apr 15 2019, 3:37 AM