Skip to content
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

Portfolio site leads to 404 #147

Open
TishG opened this issue Dec 8, 2021 · 2 comments
Open

Portfolio site leads to 404 #147

TishG opened this issue Dec 8, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@TishG
Copy link
Contributor

TishG commented Dec 8, 2021

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
image

Possible Solution
Any ideas how to fix it? Tell us here!

Steps to Reproduce

  1. Go to https://cherryon.tech/about/
  2. Click on the word, "site" for a card that has site on the lower right hand corner
@TishG TishG added the bug Something isn't working label Dec 8, 2021
@project-bot project-bot bot added this to To do in Website Project Board Dec 8, 2021
@novellac
Copy link
Contributor

novellac commented 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:

  1. 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.
  2. 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.
  3. 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.

@TishG
Copy link
Contributor Author

TishG commented Dec 10, 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:

  1. 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.
  2. 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.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants