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

Fixes issue 58 - redirects cause the visualization to break #73

Closed thomas-topway-it closed 9 months ago

thomas-topway-it commented 9 months ago

fixes https://github.com/ProfessionalWiki/Network/issues/58 see also https://github.com/ProfessionalWiki/Network/issues/69

the problem seems caused by an inconsistency between connections.pages and pageInfoResponse.query.pages (the map displayTitles is filled with items from pageInfoResponse.query.pages but the latter does not contain the redirects (they are in a separated result key) so this line page.displayTitle = displayTitles[page.title];

triggers an error. A isRedirect attribute is therefore added toApiConnectionsBuilder -> _buildPageMap and used for the tooltip as well ( NetworkData -> addPages )