Page MenuHomePhabricator

[Regression] RelatedArticles don't display on wikis not using /w as $wgScriptPath due to hard-coded path
Closed, DuplicatePublicBUG REPORT

Description

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

  • Open a wiki using MediaWiki 1.39 and using RelatedArticles, where the api.php entry point is NOT under /w/api.php . example
  • Scroll down the page

What happens?:

Related articles cards do not appear. Opening the browser console, an error appears:
The request GET https://animalcrossing.wikidex.net/w/api.php returns an HTTP 404 error.

Note how the URL should be pointed to /api.php and not /w/api.php

What should have happened instead?:

Related articles cards should appear after article content, in the footer.

Software version (skip for WMF-hosted wikis like Wikipedia):
MediaWiki 1.39

Other information (browser name/version, screenshots, etc.):
Caused by a hardcoded /w/api.php path introduced in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/RelatedArticles/+/782243/11/resources/ext.relatedArticles.readMore.bootstrap/data.json