redirection of new reddit gallery URLs not working due to thread IDs reaching 7 digits
StinkyPetersonSr opened this issue · 5 comments
Hi,
I'm using the extension on Firefox and recently noticed that some of the threads I'm trying to view are ending up in error sites. As the title says I was able to pin it down to be mainly related to the redirection of new gallery URLs. The IDs of reddit threads have only just recently (about 2 days ago) reached the 7 digits mark, while rule for gallery redirection of the extension seems to be coded around and limited to 6 digit IDs.
7 digit gallery URL/thread: https://www.reddit.com/gallery/1001d68
6 digit gallery URL/thread (1 hour before): https://www.reddit.com/gallery/zzzpeo
Do you have a source for the ids having reached 7 digits only recently?
This looks like a problem with reddit's code, not the extension. The extension doesn't have any logic based on the length of the ids: https://github.com/tom-james-watson/old-reddit-redirect/blob/master/background.js#L20-L22.
We have been relying on the fact that https://old.reddit.com/<gallery id>
will redirect to the URL for the post's comments. For example see https://old.reddit.com/zzzpeo. Looks like https://old.reddit.com/1001d68 doesn't work for some reason, though.
This needs to be raised with reddit somehow. Any idea of the best place to do that?
Created a post on /r/bugs, but not sure how likely it is to be seen: https://old.reddit.com/r/bugs/comments/1024lj2/redirect_of_oldredditcomgallery_id_doesnt_work/.
I ran into this issue repeatedly today...
If i understand the issue correctly the difficulty lies in translating eg https://www.reddit.com/gallery/1001d68
into https://old.reddit.com/r/pics/comments/1001d68/love_landscape_photography_and_considering/
with the hardest part being determining the corresponding subreddit?
I really have no experience in this at all, but couldn't a content-script, which the plugin already seems to use for injecting some css, be used to get / redirect to the "non-old" comment link from the gallery page
which in turn could be redirected to old.reddit.com? 🤔
Edit:
seems like i should have played around some more 😅
https://old.reddit.com/comments/1001d68/
actually redirect to the correct subreddit, taking care of the hardest part
Thanks @iudex- for finding a workaround and the PR. Have submitted an 1.6.1 update to firefox and chrome stores. Normally takes a few hours to be approved.
My pleasure 😊
Thank you so much