Page MenuHomePhabricator

Template backlinks on ?action=info broken on 1.37
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to the page of any template and click "Page information". An example is here.

What happens?:

You get a page 'Information for "Template: <Template Name>"'. That page has a section "Page properties" with a subsection "Pages transcluded on". That subsection is a bulleted list of pages. But the titles are all empty: You see only the bullet plus an "(edit)" link for an empty title.

Moreover: For each entry in the list, two warnings are written to error_log. One says "PHP Notice: Undefined property: stdClass::$page_title in [...]/includes/Title.php on line 3158" and the other is identical except with $page_namespace.

What should have happened instead?:

The bulleted list of "Pages transcluded on" should have visible page titles, the "(edit)" links should include real page titles, and no warnings should be logged.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

This happens in my wiki, horawiki.org, version 1.37.2, from which the example above is taken. However, if you try it on a newer version, as on mediawiki.org or test.wikipedia.org, you do NOT get this behavior, because templates' page info don't have the "Pages transcluded on" report. Presumably newer versions of MediaWiki have changed the report. But I think the problematic code is still present even though its results are no longer displayed.

Note: The behavior is unchanged when I disable all extensions. Also, the api works (http://horawiki.org/api.php?titles=Template:Documentation&action=query&prop=info%7Ctranscludedin%7Ctemplates) so not a db issue.

Just guessing at the project tag below; someone please correct it.

Event Timeline

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

Seems like Title::getLinksTo is using LinkCache::getSelectFields which does not include page_namespace or page_title on 1.37.2 (but looks refactored on master). Maybe a backport gone wrong?

Bawolff renamed this task from Possibly outdated bug in Page Information report for templates to Template backlinks on ?action=info broken on 1.37.May 23 2022, 6:53 AM
Seb35 subscribed.

Duplicate of T296435, opened before and contains a Gerrit patch for 1.37.