Skip to content

Conversation

@Franklyn-R-Silva
Copy link

This PR addresses the issues reported in dart-lang/sdk#62262 regarding the confusing 404 error page.

Changes:

  • Removed inert search boxes: Deleted the search form in the body and the {{>search_sidebar}} tag, as search scripts typically fail to load on 404 pages, leaving these boxes stuck in a "Loading..." state.
  • Fixed formatting: Simplified the 404 template to provide a cleaner user experience.
  • Improved links: Although I preserved the original text, I updated the structure to ensure the page remains functional.

Testing:

  • Manual verification: Generated documentation using dart bin/dartdoc.dart and verified the resulting 404error.html. The inert elements are gone and the layout is much cleaner.
  • Automated tests: Existing HTML generator tests were skipped locally as they are currently not supported on Windows, but the template changes were verified in the generated output.

Fixes dart-lang/sdk#62262

Copy link
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I think for the example URL this still leaves many broken links on the page. Mabye a better short-term fix would be to only have one link to the front page of the latest version....

The more comprehensive fix would be to resolve all relative paths even when the base URL is broken.

@Franklyn-R-Silva
Copy link
Author

Thanks for the PR.

I think for the example URL this still leaves many broken links on the page. Mabye a better short-term fix would be to only have one link to the front page of the latest version....

The more comprehensive fix would be to resolve all relative paths even when the base URL is broken.

In the future I think someone can implement this problem, but I'll see if I can do it for everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Api site has confusing 404-error page.

2 participants