Page MenuHomePhabricator

UploadWizard uses deprecated EditFilterMerged hook
Closed, ResolvedPublic

Description

EditFilterMerged hook usage needs replacing!

Use EditFilterMergedContent instead.

Event Timeline

Why do we even need this… we apparently do some namespace-specific validation in it. Isn't ContentHandler supposed to call the validation functions automatically?

Why do we even need this… we apparently do some namespace-specific validation in it. Isn't ContentHandler supposed to call the validation functions automatically?

Paging @daniel :)

It would indeed be nice if ContentHandler had a validate() methods that returns a Status object (or would return a meaningful message in some other way). But this is not the case, all we have right now is Content::isValue() which only returns a boolean. So using EditFilterMergedContent to do pre-save validation is probably the best option for now.

It would indeed be nice if ContentHandler had a validate() methods that returns a Status object (or would return a meaningful message in some other way). But this is not the case, all we have right now is Content::isValue() which only returns a boolean. So using EditFilterMergedContent to do pre-save validation is probably the best option for now.

That's T143761: Fix Content validation - something to replace Content::isValid() :)

Change 314625 had a related patch set uploaded (by Reedy):
Replace EditFilterMerged hook usage

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

Change 314625 merged by jenkins-bot:
Replace EditFilterMerged hook usage

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