Page MenuHomePhabricator

[wmf.11 - regression] Custom tags not working with UploadWizard
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to replicate the issue (include links if applicable):

  • I upload media with UploadWizard
  • I choose {{PD-US-no notice advertisement}} or {{PD-US-record-expired}} or {{PD-textlogo}} as public domain tags in the custom license field for the media I'm uploading
  • UploadWizard does not recognise the tags and doesn't let me go further

What happens?:
UploadWizard does not recognise the tags in the custom license field and doesn't let me go further.

What should have happened instead?:
UploadWizard should recognise such tags and let me go on with the upload.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Reformulated from this discussion.

Event Timeline

This is breaking the workflow of tons of people and should get a higher priority or commits should be reverted as I don't see this fixed over the weekend.

mdaniels5757 renamed this task from Some public domain tags are not working with UploadWizard to [wmf.11 - regression] Some public domain tags are not working with UploadWizard.Jan 10 2025, 8:17 PM
mdaniels5757 triaged this task as High priority.
mdaniels5757 subscribed.

Bumping priority per above. Based on timing, it's probably something from https://www.mediawiki.org/wiki/MediaWiki_1.44/wmf.11#UploadWizard. Maybe something from T381286 or T370106, maybe something else?

Traceback in the red popup from when I reproduced this:

Uncaught TypeError: status.getErrors is not a function
from https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5 at line 130:398 TypeError: status.getErrors is not a function at uw.ValidationMessageElement.postValidate (https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:130:398) at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:130:284 at fire (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:42:705) at Object.fireWith [as rejectWith] (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:43:903) at process (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:46:492)

And from my Dev Console:

jQuery.Deferred exception: this.getUsedTemplates is not a function TypeError: this.getUsedTemplates is not a function
    at input.validate (https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:146:887)
    at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:130:242
    at mightThrow (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:45:648)
    at process (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:46:309) undefined

uw.ValidationMessageElement.js:64 Uncaught TypeError: status.getErrors is not a function
    at uw.ValidationMessageElement.postValidate (uw.ValidationMessageElement.js:64:26)
    at uw.ValidationMessageElement.js:56:32
    at fire (jquery.js:3223:31)
    at Object.fireWith [as rejectWith] (jquery.js:3353:7)
    at process (jquery.js:3577:22)

jquery.js:3783 jQuery.Deferred exception: this.getUsedTemplates is not a function TypeError: this.getUsedTemplates is not a function
    at input.validate (https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:146:887)
    at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:130:242
    at mightThrow (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:45:648)
    at process (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:46:309) undefined

jquery.js:3783 jQuery.Deferred exception: status.getErrors is not a function TypeError: status.getErrors is not a function
    at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:132:229
    at Array.forEach (<anonymous>)
    at uw.ValidationStatus.mergeStatus (https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:132:203)
    at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.uploadWizard%7Cext.uploadWizard.page&skin=vector&version=15ev5:132:659
    at mightThrow (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:45:648)
    at process (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.feedback%2CmessagePoster%7Cmediawiki.widgets.styles&skin=vector&version=drcfd:46:309) undefined
Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptJan 10 2025, 8:18 PM
mdaniels5757 renamed this task from [wmf.11 - regression] Some public domain tags are not working with UploadWizard to [wmf.11 - regression] Custom tags not working with UploadWizard.Jan 10 2025, 8:20 PM
mdaniels5757 added a project: Commons.

The same phenomenon has also occurred with licenses that were previously accepted, such as {{PD-Somalia}}.

I have such problems with {{PD-text}} {{PD-shape}} and {{Data license Germany-attribution-2.0}}

Reproducible with {{PD-PRC-exempt}}.
I thought it was a bug with my browser. It turns out to trouble many uploaders.

Aklapper raised the priority of this task from High to Unbreak Now!.Jan 11 2025, 1:45 PM

I had the problem with {{PD-USGov-Army}}. Worked around it by checking the US gov box, then later changing the licence from {{PD-USGov}} to {{PD-USGov-Army}}

Traceback in Chrome:

Uncaught TypeError: status.getErrors is not a function
    at uw.ValidationMessageElement.postValidate (uw.ValidationMessageElement.js:64:26)
    at uw.ValidationMessageElement.js:56:32
    at fire (jquery.js:3223:31)
    at Object.fireWith [as rejectWith] (jquery.js:3353:7)
    at process (jquery.js:3577:22)

I picked a non-custom license in order to upload. Then after the upload, I changed to the custom license: {{PD-chart}}

I have the same problem with {{PD-VenezuelaGov}} and {{PD-textlogo}}, uploadwizard does not recognize these tags (google translator).

Note: to reproduce on a local mediawiki install requires setting $wgUploadWizardConfig['customLicenseTemplate'] = 'Template:License_template_tag'; to trigger the faulty code path.

Change #1110456 had a related patch set uploaded (by Dylsss; author: Dylsss):

[mediawiki/extensions/UploadWizard@master] Fix exceptions preventing user from continuing past license deeds

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

matthiasmullie subscribed.

That patch looks great, thanks @Dylsss!

For the record: I had introduced this regression in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/UploadWizard/+/1101084 (as part of T381286), where I seem to have lost track of a code path during refactoring. My apologies!

Change #1110456 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Fix exceptions preventing user from continuing past license deeds

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

Change #1110750 had a related patch set uploaded (by Reedy; author: Dylsss):

[mediawiki/extensions/UploadWizard@wmf/1.44.0-wmf.11] Fix exceptions preventing user from continuing past license deeds

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

Change #1110750 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@wmf/1.44.0-wmf.11] Fix exceptions preventing user from continuing past license deeds

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

Mentioned in SAL (#wikimedia-operations) [2025-01-13T12:18:37Z] <reedy@deploy2002> Synchronized php-1.44.0-wmf.11/extensions/UploadWizard/: T383415 (duration: 13m 05s)

Etonkovidova claimed this task.
Etonkovidova subscribed.

Checked in commons wmf.11 - the UploadWizard custom license field accepts the public domain tags mentioned in the task description, i.e. the Preview is available and UploadWizard allows to move to the next step.
Also, checked the field for a copyright tag (Own work upload).