Skip to content

Fix 404 error page formatting and broken links - #4139

Open
Franklyn-R-Silva wants to merge 1 commit into
dart-lang:mainfrom
Franklyn-R-Silva:fix-404-page-62262
Open

Fix 404 error page formatting and broken links#4139
Franklyn-R-Silva wants to merge 1 commit into
dart-lang:mainfrom
Franklyn-R-Silva:fix-404-page-62262

Conversation

@Franklyn-R-Silva

Copy link
Copy Markdown

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

@szakarias szakarias left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

@szakarias

Copy link
Copy Markdown
Contributor

@Franklyn-R-Silva , are you planning to work on this anytime soon?

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