Network icon indicating copy to clipboard operation
Network copied to clipboard

Redirects cause the visualization to break

Open JeroenDeDauw opened this issue 2 years ago • 2 comments

Steps to reproduce

  • Go to https://maps.extension.wiki/wiki/Special:Network
  • Put Maps for MediaWiki in the main box and submit
  • Error in browser console

JeroenDeDauw avatar Mar 24 '22 13:03 JeroenDeDauw

From @cicalese:

The problem is not that DisplayTitle is not installed. The problem is that it is not correctly handling redirects. The page Maps for MediaWiki links to Displaying Google Maps, which is a redirect to Displaying Google maps. It retrieves the display title for Displaying Google maps but looks for the display title for Displaying Google Maps in the resulting array.

I'm not sure what the solution is.

...

All of the information we need to resolve the redirects is already sent back in the redirects element in the query (see https://www.mediawiki.org/wiki/API:Query#Resolving_redirects). It's just a matter of figuring out a reasonable algorithm to handle multiple redirects and circular redirects. It should be done in ApiPageConnectionRepo.prototype._getDisplayTitles, populating the displayTitles array for each source page in the returned redirects array.

JeroenDeDauw avatar Mar 24 '22 13:03 JeroenDeDauw

+1 on this, could help PR if devs pointed me to where the problem is happening :)

sneakers-the-rat avatar Oct 01 '22 19:10 sneakers-the-rat

The above comment says "closed" - but this still breaks, possibly for redirects. Will there be a fix?

squirrelslair avatar Jul 19 '23 16:07 squirrelslair

I was actually going to try to look at this this week, but I encountered #71.

cicalese avatar Jul 19 '23 16:07 cicalese

Hello @cicalese! Did you have a chance to look into this bug?

M-APatel1 avatar Nov 12 '23 09:11 M-APatel1