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

Bug: Local preview for resources leads to 404 #1309

Open
2 tasks done
adiati98 opened this issue Dec 23, 2024 · 5 comments
Open
2 tasks done

Bug: Local preview for resources leads to 404 #1309

adiati98 opened this issue Dec 23, 2024 · 5 comments
Assignees
Labels
Status: Needs Triage This issue hasn't been reviewed by maintainers yet. Type: Bug Something isn't working

Comments

@adiati98
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

When navigating between pages locally in the resources, they all lead to 404.

This happens because the link should be http://localhost:9000/resources/{page}. However, as resources lives in the content folder, whenever we navigate to a page, the link will go to http://localhost:9000/content/resources/{page}.

I attached here the screen recording of local preview.

Note: Please be informed that this only happens for the resources folder. It doesn't affect the members and newsletters folders that also live in the content folder.

Steps To Reproduce

  1. Run the project locally with pnpm dev.
  2. Once it's ready, go to http://localhost:9000/resources.
  3. Click the link to any page to open it.
  4. You will get 404.

What browsers are you seeing the problem on?

Chrome

Environment

- OS:
- Node:
- pnpm:

Anything else?

404-on-local-preview.mp4

Code of Conduct

  • I've read the Code of Conduct and understand my responsibilities as a member of the Virtual Coffee community
@adiati98 adiati98 added Type: Bug Something isn't working Status: Needs Triage This issue hasn't been reviewed by maintainers yet. labels Dec 23, 2024
@adiati98
Copy link
Contributor Author

@danieltott I'm not sure if this is the good practice, but I tried to rename content folder to (content) so that it won't be included in the path. But it didn't allow me to rename the folder. 😁

@fuyalasmit
Copy link
Contributor

@adiati98 Is this issue already solved or this is not how I shall be reproducing the issue ?

2025-02-04.06-05-41.mp4

@danieltott
Copy link
Member

@adiati98 I am 99% sure this is a directory-related issue running the site on windows. The content directory is outside the app directory and isn't involved in creating paths, but something in the logic is leaving that in the url/slug on your machine (and I assume all windows-based machines)

@danieltott
Copy link
Member

@adiati98 can you pull down the bug/paths-on-windows branch and see if this solved the issue (or changed the behavior in any way 😂)

@adiati98
Copy link
Contributor Author

adiati98 commented Feb 6, 2025

@danieltott it works like a charm!!! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage This issue hasn't been reviewed by maintainers yet. Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants