Ethereum-org-website: 404 pages should not load assets via relative paths

Created on 18 May 2020  路  7Comments  路  Source: ethereum/ethereum-org-website

Describe the bug

If we load an 404 page that has more than one URI segment (e.g: ethereum.org/segment-1/segment-2), most assets will fail to load.

Due to the prefetch mechanism for the site content, one 404 page can generate hundreds more 404 requests.

To Reproduce
This works: https://ethereum.org/not-found

This doesn't work: https://ethereum.org/page/not-found

Expected behavior

Screenshots
Expected:
image

Result:
image

Bug

All 7 comments

Ah, thanks for surfacing @evertonfraga!

I suspect this was created when we added IPFS support in #896 - we installed [vuepress-plugin-ipfs](https://www.npmjs.com/package/vuepress-plugin-ipfs) which uses [all-relative](https://www.npmjs.com/package/all-relative)as a dependency.

@cwaring I'm curious - how have you folks dealt with this issue? Do you know if there's a way we can prevent using relative paths for a certain component (NotFound.vue)? Thanks in advance!

@all-contributors please add @evertonfraga for bugs

@samajammin

I've put up a pull request to add @evertonfraga! :tada:

@samajammin hi, I think in this case adding a baseurl to the 404 page should fix it. If not let me know and I'll see if I can cut a new release to handle dynamic pages better.

@cwaring that did the trick! Thanks.

Closing this out - solved in #1033.

@all-contributors please add @cwaring for ideas

@samajammin

I've put up a pull request to add @cwaring! :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samajammin picture samajammin  路  6Comments

ahmeteminkocal picture ahmeteminkocal  路  6Comments

samajammin picture samajammin  路  6Comments

samajammin picture samajammin  路  5Comments

shazow picture shazow  路  5Comments