Open TishG opened 2 years ago
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.vue
and Biopost.vue
.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.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
andBiopost.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 forportfolio_url
shows me entries in bothAbout.vue
andBiopost.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 theportfolio_url
to 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 withhttp
orhttps
. 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 appendhttps
on urls that don't have it.
Thank you. I like the idea of writing a utility function that appends https
to the urls.
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!
Steps to Reproduce