You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yikes! Briefly, what seems wrong?
When I click on "Portfolio", I am taken to the url https://cherryon.tech/bio/[users name]/[portfolio website url], page says "404 not found"
Expected Behavior
You should be taken to the portfolio website
Current Behavior
Get 404 not found error
Possible Solution
Any ideas how to fix it? Tell us here!
I think the issue is that the URLs are getting processed as relative if they don't start with http or https.
To debug, I did the following:
Used the Chrome Vue extension, I checked to see which component is responsible for printing the link. We are printing the link in two places - in About.vue and Biopost.vue.
I noticed that the URLs which don't work lead to a URL with what looks like an exact address at the end. I looked through our codebase for one of these exact addresses (e.g. www.juliethfajardo.com) and found that they're attached to a portfolio_url. Looking through the codebase for portfolio_url shows me entries in both About.vue and Biopost.vue. This doesn't discover anything new, but further corroborates what I found with dev tools.
In one of the bio markdown files (I used tish-g.md), I noticed the changed the portfolio_url to preface the url with https://. When I go back to the page, the link now works as expected.
Conclusion: URLs aren't getting processed as absolute unless they're prefaced with http or https.
What can we do about it?
One option might be to see if we can edit our Forestry CMS configurations to validating them as URLs.(we can't, I tried)
Another option would be to write a small utility function which would append https on urls that don't have it.
I think the issue is that the URLs are getting processed as relative if they don't start with http or https. To debug, I did the following:
Used the Chrome Vue extension, I checked to see which component is responsible for printing the link. We are printing the link in two places - in About.vue and Biopost.vue.
I noticed that the URLs which don't work lead to a URL with what looks like an exact address at the end. I looked through our codebase for one of these exact addresses (e.g. www.juliethfajardo.com) and found that they're attached to a portfolio_url. Looking through the codebase for portfolio_url shows me entries in both About.vue and Biopost.vue. This doesn't discover anything new, but further corroborates what I found with dev tools.
In one of the bio markdown files (I used tish-g.md), I noticed the changed the portfolio_url to preface the url with https://. When I go back to the page, the link now works as expected.
Conclusion: URLs aren't getting processed as absolute unless they're prefaced with http or https.
What can we do about it?
One option might be to see if we can edit our Forestry CMS configurations to validating them as URLs.(we can't, I tried)
Another option would be to write a small utility function which would append https on urls that don't have it.
Thank you. I like the idea of writing a utility function that appends https to the urls.
Activity
novellac commentedon Dec 8, 2021
I think the issue is that the URLs are getting processed as relative if they don't start with http or https.
To debug, I did the following:
About.vueandBiopost.vue.portfolio_url. Looking through the codebase forportfolio_urlshows me entries in bothAbout.vueandBiopost.vue. This doesn't discover anything new, but further corroborates what I found with dev tools.tish-g.md), I noticed the changed theportfolio_urlto preface the url withhttps://. When I go back to the page, the link now works as expected.Conclusion: URLs aren't getting processed as absolute unless they're prefaced with
httporhttps.What can we do about it?
One option might be to see if we can edit our Forestry CMS configurations to validating them as URLs.(we can't, I tried)
Another option would be to write a small utility function which would append
httpson urls that don't have it.TishG commentedon Dec 10, 2021
Thank you. I like the idea of writing a utility function that appends
httpsto the urls.