Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects cause the visualization to break #58

Closed
JeroenDeDauw opened this issue Mar 24, 2022 · 5 comments · Fixed by #73
Closed

Redirects cause the visualization to break #58

JeroenDeDauw opened this issue Mar 24, 2022 · 5 comments · Fixed by #73
Labels
bug Something isn't working

Comments

@JeroenDeDauw
Copy link
Member

Steps to reproduce

@JeroenDeDauw JeroenDeDauw added the bug Something isn't working label Mar 24, 2022
@JeroenDeDauw
Copy link
Member Author

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
Copy link

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

@squirrelslair
Copy link
Contributor

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

@cicalese
Copy link
Collaborator

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

@M-APatel1
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants