Page MenuHomePhabricator

NearbyPages no longer works for articles with non-ASCII letters
Closed, ResolvedPublicBUG REPORT

Description

NearbyPages no longer works for articles with letters other than [a-z].

Steps to replicate the issue:

Follow one of these links for locations with non-English letters:

What happens?:

You get an error message: "Wikipedia Nearby is having some issues."

What should have happened instead?:

You should get a list with articles that are geotagged nearest to the location.
See e.g.: https://en.wikipedia.org/wiki/Special:Nearby#/page/London

Other information (browser name/version, screenshots, etc.):

I use Safari with iPadOS 16

Event Timeline

Aklapper renamed this task from NearbyPages no longer works for articles with non-English letters to NearbyPages no longer works for articles with non-ASCII letters.Jan 14 2023, 3:31 AM

I wamt to work on this issue? how do i get started?

Hey @AymanMakroo in particular you'll need to setup MediaWiki and https://m.mediawiki.org/wiki/Extension:NearbyPages following the instructions on the page. Let me know when you've managed that!

I have setup the environment and able to reproduce the issue locally
I would like to work on it

Go for it! Looking forward to your patch!

  • Inside extensions/NearbyPages/resources/ext.nearby.scripts/App.vue there is a router object which has a key called oldHash
  • Now when the URL is for example : /wiki/Special:Nearby#/page/London then oldHash is /page/London
  • But when the URL is /wiki/Special:Nearby#/page/Lübeck then oldHash is /page/L%C3%BCbeck
  • the issue has been resolved by decoding the URL by using js inbuilt function decodeURI(EncodedURL)
  • Have Tested it against words like Nordstraße_station , Düsseldorf , Lübeck, Curaçao , Tera_Corá

Do not know how to submit the patch and have asked question about the same in mediawiki channel on librechat

This comment was removed by Nik.xyz.in.

I have push the changes to gerrit
This is link
@Jdlrobson

Change 884533 had a related patch set uploaded (by Aklapper; author: Nik.xyz.in):

[mediawiki/extensions/NearbyPages@master] Show result for non-ASCII letters in URL

https://gerrit.wikimedia.org/r/884533

This comment was removed by Nik.xyz.in.

Change 885015 had a related patch set uploaded (by Nik.xyz.in; author: Nik.xyz.in):

[mediawiki/extensions/NearbyPages@master] Show Result for Non Ascii characters

https://gerrit.wikimedia.org/r/885015

Change 884533 abandoned by Jdlrobson:

[mediawiki/extensions/NearbyPages@master] Show result for non-ASCII letters in URL

Reason:

Superseded by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/NearbyPages/+/885015

For future reference, you can git commit --amend your patch and use `git review` - as long as the change id is the same you'll keep the code review conversation in one place.

https://gerrit.wikimedia.org/r/884533

Change 885015 merged by jenkins-bot:

[mediawiki/extensions/NearbyPages@master] Show Result for Non Ascii characters

https://gerrit.wikimedia.org/r/885015