Skip to content

fix: DocLink routing; use internal link component #15327

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

microHoffman
Copy link
Contributor

Description

Currently when clicking on internal link in Learn page ( https://ethereum.org/en/learn/ ), it ended up in 404 redirect, because of the missing i18n (links are pointed to https://ethereum.org/quizzes/ and not to https://ethereum.org/[locale]/quizzes/m which resulted in 404 page not found.

I mean links in these sections:
image

I've fixed it by using the InlineLink component in DocLink component, which handles the addition of i18n locale to links automatically.

Copy link

netlify bot commented Apr 22, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit a4470b8
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/68075bcda8256b0008f53fcf
😎 Deploy Preview https://deploy-preview-15327--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 43 (🔴 down 6 from production)
Accessibility: 95 (🟢 up 1 from production)
Best Practices: 89 (🔴 down 9 from production)
SEO: 98 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@taxmeifyoucan
Copy link
Member

This should fix #15337 as well. Bunch of internal and external links are broken, can we please get this resolved @wackerow

@microHoffman
Copy link
Contributor Author

microHoffman commented Apr 25, 2025

This should fix #15337 as well. Bunch of internal and external links are broken, can we please get this resolved @wackerow

Maybe the errors will still happen on a few other places as there are multiple components being used for links across the app, but at least for those in the Learn section boxes it should fix it:)

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Agree this is a bug that needed to be fixed, since these were not using the appropriate NextLink (which InlineLink uses under-the-hood) to properly handle /locale/ and internal page routing.

This does not fix #15337 which is an unrelated, and more global problem where direct links to say https://ethereum.org/learn are not being automatically forwarded to the default locale, ie https://ethereum.org/en/learn

Pulling this in (Thanks @microHoffman!) but keeping that issue open

@wackerow wackerow changed the title fix: 404 links on Learn page, add i18n-style link support to DocLink fix: DocLink routing; use internal link component Apr 25, 2025
@wackerow wackerow merged commit 9821351 into ethereum:dev Apr 25, 2025
6 checks passed
Copy link

gitpoap-bot bot commented Apr 25, 2025

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2025 Ethereum.org Contributor:

GitPOAP: 2025 Ethereum.org Contributor GitPOAP Badge

Join the [ethereum.org Discord server](https://ethereum.org/discord) to explore more ways to contribute to the project. Depending on the tasks you complete, you may also unlock additional rewards. Visit [ethereum.org/contributing](https://ethereum.org/contributing) to learn more.

Head to gitpoap.io & connect your GitHub account to mint!Keep buidling, keep learning, and let's grow the Ethereum open-source community together 🌱

Learn more about GitPOAPs here.

@wackerow
Copy link
Member

@all-contributors please add @microHoffman for bug fix

Copy link
Contributor

@wackerow

I've put up a pull request to add @microHoffman! 🎉

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.

3 participants