Page MenuHomePhabricator

Non-free images incorrectly appearing in RelatedPages
Closed, ResolvedPublic

Description

Related Pages (aka Read More) is not supposed to include non-free images.

At the mobile view for EnWiki article Facial_tissue I just received a RelatedPage link to Andrex, including this non-free image. I verified that image page is correctly categorized as [[Category:All non-free media]]. The file page hasn't been edited in 5 years, so there are no recent changes confusing the situation.

Either:

  1. RelatedPages is incorrectly requesting that non-free images be included; or
  2. RelatedPages is requesting a free image, and PageImage failing to filter out the non-free image.

Event Timeline

The extension doing the filtering is CommonsMetadata (more precisely, it provides the license metadata used in the PageImages filtering logic). You can see the raw metadata here. (Compare, for example, File:'Breakfast Buddha' by Allyn Bromley, 2004.JPG - there is a NonFree metadata field.)

The problem is caused by wrong license markup (two blocks with licensetpl class, the first empty) in the {{non-free television screenshot}} template - the correct one generated by {{Non-free media}}, the other seemingly comes from {{imbox}} aka Module:Message box but I can't find it there.

Judging by Category:Files with no machine-readable license the problem is fairly widespread (although might be caused by a small number of templates/modules).

The task for making the handling of such incorrect markup more robust in CommonsMetadata is T131896.

Ah, it has a separate configuration page. licensetpl was added there as part of the metadata cleanup drive, so probably it was needed back then. Maybe something changed about the usage pattern of that template?

In any case, moving {{Non-free media}} to the front of Template:Non-free_television_screenshot is a simple fix. (Removing licensetpl in the imbox config would work too, but maybe something somewhere is using it?) There are lots of templates which are probably similarly affected though, so fixing T131896 might be easier (it has a patch already).

Deskana claimed this task.
Deskana added a subscriber: Deskana.

I forced the situation by manually adding the non-free metadata tags to Template:Non-free television screenshot. The Andrex article now has no page image associated with it, as the only image in the article is non-free, so this is resolved.

Maintenance of content-related templates is normally outside Foundation jurisdiction. I encourage people on the English Wikipedia to take a look at these templates and see if there are other similar errors.

Neither related to RelatedArticles code nor to PageImages code but to on-wiki content managed by the community. Hence updating project tags of this task.
(And thanks to Tgr and Deskana for investigating and fixing this.)

The English Wikipedia community already correctly tags all non-free media with [[Category:All non-free media]]. If PageImages chooses not to use this (machine readable) system but relies on a different one (whose documentation I was unable to find anywhere on the English Wikipedia), that does not seem to be the English Wikipedia's problem, but one with PageImages.

@Deskana while a working short term fix, I would note that this does need a better solution as this makes it worse. Preferably T131896 I think, for as long as we still don't have proper structured metadata.

Also, while "I encourage people on the English Wikipedia to take a look at these templates and see if there are other similar errors." is nice in theory, this community has repeatedly shown a complete lack of interest towards doing the work to provide proper metadata to the various APIs. They only care about Fair use rationales.

I mean, they don't have to look for errors, from this page and this category, we already know that there are many problems there and little motivation to work on those problems.

To staff/devs: Thanks for the quick fix here.

@Kusma and others:
I created T177160 proposing the use of [[Category:All non-free media]].