Page MenuHomePhabricator

wscontest doesn't work with mulwikisource
Closed, ResolvedPublicBUG REPORT

Description

An index page such as https://wikisource.org/wiki/Index:Caba_Executive_Order_No._17_-_2020.pdf results in

Unable to load Wikisource info from 'https://wikisource.org/wiki/Index:Caba_Executive_Order_No._17_-_2020.pdf'

And one with mul., https://mul.wikisource.org/wiki/Index:Caba_Executive_Order_No._17_-_2020.pdf (not that that is what we should expect people to enter) gives

Impossible to access an attribute ("0") on a string variable ("Wikisource 'mul' does not exist").
in templates/base.html.twig:42

The component responsible for this is probably PHP-API-for-Wikisource.

Event Timeline

Maybe the query we're using to find all available Wikisources is wrong:

SELECT ?item ?langCode ?langName WHERE { 
  ?item wdt:P31 wd:Q15156455 . 
  ?item wdt:P424 ?langCode . 
  ?item wdt:P407 ?lang . 
  ?lang rdfs:label ?langName . 
  FILTER(LANG(?langName) = ?langCode) . }

(needs || ?langCode = 'mul'?)

GitHub PR for wikisource/api here

PMenon-WMF changed the task status from Open to In Progress.Sep 1 2023, 3:32 PM

Version 2.0.6 of wikisource/api is released now, so wscontest can be updated to use it.

Patch is released in 2.4.0, and deployed.