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

Wrong link leading to 404 error #57110

Open
jbcormoreche opened this issue Nov 15, 2024 · 5 comments
Open

Wrong link leading to 404 error #57110

jbcormoreche opened this issue Nov 15, 2024 · 5 comments
Assignees
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-documentation A request to add or improve documentation

Comments

@jbcormoreche
Copy link

There's a link (https://api.dart.dev/stable/dart-core/Map-class.html) in a comment of the file html_dart2js.dart that leads to a 404 error.

The correct link is: https://api.dart.dev/dart-core/Map-class.html

It can found at line 30136 here:
https://github.com/dart-lang/sdk/blob/main/sdk/lib/html/dart2js/html_dart2js.dart

@dart-github-bot
Copy link
Collaborator

Summary: Broken link in html_dart2js.dart (line 30136) points to a non-existent Dart API page; correct link omits "stable/".

@dart-github-bot dart-github-bot added area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Nov 15, 2024
@devoncarew devoncarew added type-documentation A request to add or improve documentation and removed triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. labels Nov 15, 2024
@parlough
Copy link
Member

@athomas This also broke existing links from the Dart website. Is it possible to add a wildcard redirect so api.dart.dev/stable/dart-core/Map-class.html is redirected to api.dart.dev/dart-core/Map-class.html?

It seems like api.dart.dev/stable to api.dart.dev works, just not if any paths follow stable/.

@athomas athomas self-assigned this Nov 18, 2024
@athomas
Copy link
Member

athomas commented Nov 18, 2024

As a first step, I created https://dart-review.googlesource.com/c/sdk/+/395961 to update the URLs to use the canonical version.

Similarly, the Dart website should not use the /stable/ path component unless it's linking to a specific version (/stable/1.2.3).

I believe I can add redirects for api.dart.dev/stable/dart-** -> api.dart.dev/dart-** which probably fixes most of those cases.

@parlough
Copy link
Member

Thank you!

Similarly, the Dart website should not use the /stable/ path component unless it's linking to a specific version (/stable/1.2.3).

+1 Marya completed this in dart-lang/site-www@8c650ca. We'll make sure to follow this from now on as well.

I believe can add redirects for api.dart.dev/stable/dart-** -> api.dart.dev/dart-** which probably fixes most of those cases.

That sounds great and would be appreciated, as I imagine there are at least a few other links without an exact version across the internet.

@biggs0125 biggs0125 added area-documentation Prefer using 'type-documentation' and a specific area label. and removed area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Nov 19, 2024
@athomas
Copy link
Member

athomas commented Nov 19, 2024

Load balancer has been updated with the new redirect. The bug will be closed when the CL cleaning up the SDK has landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

6 participants