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

Bad URL #2518

Closed
manosrenieris opened this issue Jul 12, 2020 · 10 comments
Closed

Bad URL #2518

manosrenieris opened this issue Jul 12, 2020 · 10 comments
Assignees
Labels
e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.link Adds, changes, or removes a link to a page p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.

Comments

@manosrenieris
Copy link

URL: https://www.dartlang.org/docs/tutorials/fetchdata/
Linkedfrom: https://api.dart.dev/stable/2.8.4/dart-html/HttpRequest-class.html
Expected page: Possibly https://dart.dev/tutorials/web/fetch-data

@zhesha
Copy link
Contributor

zhesha commented Jul 13, 2020

The link is under the "Other resources" section(first link), link title is "Fetch Data Dynamically" and description is "a tutorial from A Game of Darts, shows two different ways to use HttpRequest to get a JSON file." and it fails with 404.
Interesting that next link says "Get Input from a Form, another tutorial from A Game of Darts, shows using HttpRequest with a custom server." and in links to https://angulardart.dev/guide/forms and not to "A Game of Darts" and there is nothing about HttpRequest, so I think it wrong as well.
I don't know what is "A Game of Darts" so I am not sure is it possible to fix them, maybe just remove?

@zhesha
Copy link
Contributor

zhesha commented Jul 13, 2020

Also, the issue should be moved to "dart-lang/sdk", as an API page generated from comments in code. I can create PR to fix this, but I'm not sure is simply removing these two links is good enough. Also, we can add a link to https://dart.dev/tutorials/web/fetch-data, as it has some explanation about HttpRequest.

@kwalrath
Copy link
Contributor

Thanks for the report, @manosrenieris, and for the analysis, @zhesha.

I think we should update the API doc comments (dart-lang/sdk) and add a redirect on site-www to fetch-data.

@kwalrath kwalrath added e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. bad URL co.beginner Community opportunity to make a small change to documentation labels Jul 13, 2020
@zhesha
Copy link
Contributor

zhesha commented Jul 13, 2020

@kwalrath I want help, but I am not sure how. I think we should remove two links to "tutorial from A Game of Darts" because there is no such tutorial. And add a new link to https://dart.dev/tutorials/web/fetch-data. If I'm right I will create PR tomorrow. If you need more time to investigate how to change these links, I'll wait.

@kwalrath
Copy link
Contributor

kwalrath commented Jul 14, 2020

It's been a long time since I modified the API docs, but it should be possible via a dart-lang/sdk PR (cc me!). As to creating a redirect, you'd do that by adding an entry to the long list in https://github.com/dart-lang/site-www/blob/master/firebase.json.

@kwalrath kwalrath removed the co.beginner Community opportunity to make a small change to documentation label Jul 14, 2020
@kwalrath
Copy link
Contributor

As for "A Game of Darts", it's just the old name for the Dart tutorials. The equivalent today would be https://dart.dev/tutorials.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Aug 26, 2020
As "Forms" tutorial doesn't mentions `HttpRequest ` the link was removed from a doc. And Link to "Fetch Data Dynamically" was updated, so description and URL become correct.
Issue from "site-www" repo [](dart-lang/site-www#2518)

Closes #42696
#42696

GitOrigin-RevId: 34d006a
Change-Id: If3d55af29ae89594b45544dd308b60ac670f2032
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154401
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
zhesha added a commit to zhesha/site-www that referenced this issue Sep 12, 2020
@zhesha
Copy link
Contributor

zhesha commented Sep 12, 2020

@kwalrath I have created PR to dart-lang/sdk, and it already merged.
Here is a change to file with redirects master...zhesha:patch-1
Can you accept this change and can we update API docs from dart-lang/sdk comments, as they are updated?

@kwalrath
Copy link
Contributor

Thank you, @zhesha! Your change looks good, except that the URL should be a host-agnostic path. Could you create a PR for the change? (I could, but then you wouldn't get credit.)

BEFORE:
      { "source": "/docs/tutorials/fetchdata", "destination": "https://dart.dev/tutorials/web/fetch-data", "type": 301 },
 
AFTER:
      { "source": "/docs/tutorials/fetchdata", "destination": "/tutorials/web/fetch-data", "type": 301 },

@zhesha
Copy link
Contributor

zhesha commented Sep 15, 2020

I have created the right patch master...zhesha:patch-2 . But I don't have a button to close the previous one. Also, as I can see there are some changes in API docs comments in dart-lang/sdk repo, so will you regenerate API doc section on site?

@kwalrath
Copy link
Contributor

The API doc gets regenerated automatically, but it takes a while for changes to make their way to the stable channel. You can check out the latest generated docs by going to the be (bleeding edge) docs:

https://api.dart.dev/be/dart-html/HttpRequest-class.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.link Adds, changes, or removes a link to a page p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.
Projects
None yet
Development

No branches or pull requests

4 participants