Page MenuHomePhabricator

Ensure IPA from a wikibase item is not rendered when PhonosIPARenderingEnabled is false
Closed, InvalidPublic

Description

Acceptance criteria

  • Have $wgPhonosIPARenderingEnabled = false; set in LocalSettings
  • Add a Phonos parser tag with not-yet rendered IPA to a page
    • This should display an error
  • Add a Phonos parser tag with a file link to a page
    • This should play
  • Add a Phonos parser tag with a wikibase link to a page
    • If the wikibase item has an audio file, this should play
    • If the wikibase item does not, and does have IPA, it should not play (unless the IPA has already been rendered and persisted)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 900339 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] PhonosIPARenderingEnabled: Ensure wikibase IPA rendering is prevented

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

I'm not able to replicate this bug. It looks like $wgPhonosIPARenderingEnabled = false; works as expected already, for Wikibase-retrieved ipa values.

Looking at the code, it makes sense from my reading: Phonos::handleWikibaseEntity() fetches the IPA for an item, and sets it as $options['ipa'] which is then passed to Phonos::handleNewFile() which does the check for $wgPhonosIPARenderingEnabled.

The above patch I think throws the exception too early, because it doesn't allow for Wikibase-retrieved IPA that's already been rendered to be made available.

Change 900339 abandoned by Samtar:

[mediawiki/extensions/Phonos@master] Phonos: Ensure wikibase IPA rendering is prevented

Reason:

T332318#8704344

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