ProfessionalWiki / Network

MediaWiki extension for adding interactive network visualizations to your wiki pages
https://professional.wiki/en/news/mediawiki-page-network
Other
26 stars 9 forks source link

Redirects cause the visualization to break #58

Closed JeroenDeDauw closed 10 months ago

JeroenDeDauw commented 2 years ago

Steps to reproduce

JeroenDeDauw commented 2 years ago

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.

sneakers-the-rat commented 2 years ago

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

squirrelslair commented 1 year ago

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

cicalese commented 1 year ago

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

M-APatel1 commented 11 months ago

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