-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
β Broken Date Links in Aerospace Biography Articles Page and few more #817
Comments
Thanks for the report! We use an endpoint in WP1 to perform the redirect. The broken URL is:
It's possible that the slash in the article name is causing the link to not be properly routed to the redirect endpoint, though that seems difficult to believe since it is escaped ( |
Hi, first time here and a bit new to open source as well, can I be assigned to this? |
Hi @IWang20. We don't assign issues, but feel free to submit a PR! |
Gotcha, also is there any way to communicate with other devs other than the issues page on Github? |
Yes, see https://wiki.kiwix.org/wiki/Communication and in particular the Kiwix Slack |
What is possible is that the page is really missing from the ZIM due to the slash in article name. Slash in article name are a nightmare to handle because they have two semantics in Mediawiki : |
This issue has nothing to do with ZIMs. It's not part of any ZIM creation process, but rather the WP1 Bot part of the WP1 web app. This is the page in question: https://wp1.openzim.org/#/project/Aerospace%20biography/articles?quality=Project-Class For an example of pages that work, see: https://wp1.openzim.org/#/project/Aerospace%20biography/articles?quality=GA-Class On the latter, clicking a timestamp takes you to the page revision at that time, presumably so that you can verify that the version of the page "really is GA quality". |
I have tried this on a couple of articles with the |
Yes, it is possible that this the slash needs to be escaped when retrieving the page from the API. |
The main problem is that the broken link never enters the route "//redirect" in My solution is double encode the name section of the url in frontend. And decode the name section at the backend. I can't test if it redirects correctly because I don't have Toolforge API key but the fix in pull request I linked above should allow the broken url to be processed by the articles router and get the original name and timestampt. |
I don't think that SO answer is the exact problem we're seeing here. In their case, the URL param has a "leading" slash (ie |
The nature of Flask is that it decodes the URL before it matches the routing. When we send |
That makes sense, and I think you're right. However, it's probably more straightforward to forgo "pretty URLs" than to double encode the parameters. So we could re-write the route to:
and pass the url as:
The URL is only really seen by the API backend so it shouldn't affect the user experience. All of this just fixes the routing though, and you still have the issue with the API lookup as described in #822 (comment) |
π Issue :
Some date links in the Aerospace Biography Articles page are not working. Clicking on them results in a "Not Found" error.
π Steps to Reproduce:
Go to [Page URL] (if applicable).
Click on any date link (e.g., 2009-04-23).
The link leads to a "Not Found" error instead of the expected content.
β Expected Behavior:
Clicking on a date link should navigate to the correct page.
β Actual Behavior:
Some date links lead to a "Not Found" page.
π‘ Suggested Fix:
Check if the linked URLs are correct.
Ensure the target pages exist.
Fix any incorrect routing or broken paths.
Would appreciate a fix for this issue. Let me know if further details are needed. Thanks!
The text was updated successfully, but these errors were encountered: