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: Mis-linked page (Again) #1038

Open
IyaadDev opened this issue Oct 18, 2024 · 22 comments · May be fixed by #1117
Open

🐛 Bug: Mis-linked page (Again) #1038

IyaadDev opened this issue Oct 18, 2024 · 22 comments · May be fixed by #1117
Assignees
Labels
🐛 Bug Indicates that the issue is a bug or defect. good first issue Good for newcomers Hacktoberfest Issues accepeted Hacktoberfest'24 Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@IyaadDev
Copy link
Contributor

IyaadDev commented Oct 18, 2024

Describe the bug

This line of code

const markdownFile = '_indexPage';

is faulty, every page with this code which has a "Contribute to this on GitHub" redirects to https://github.com/json-schema-org/website/blob/main/pages/{url}/_index.md , which is a 404.

Steps To Reproduce

Example:

  1. Navigate to https://json-schema.org/overview/faq
  2. Click on the Contribute to GitHub button
  3. Arrive at https://github.com/json-schema-org/website/blob/main/pages/overview/faq/_index.md (404)
  4. Error reproduced

Expected Behavior

A 200 response on the editable source code page.

Screenshots

No response

Device Information [optional]

- OS: Ubuntu 20.04 Noble
- Browser: Firefox, Chrome
- version: 22

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

@IyaadDev IyaadDev added Status: Triage This is the initial status for an issue that requires triage. 🐛 Bug Indicates that the issue is a bug or defect. labels Oct 18, 2024
@DhairyaMajmudar DhairyaMajmudar added good first issue Good for newcomers Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Hacktoberfest Issues accepeted Hacktoberfest'24 Status: Available No one has claimed responsibility for resolving this issue. and removed Status: Triage This is the initial status for an issue that requires triage. labels Oct 18, 2024
@DhairyaMajmudar
Copy link
Member

Thanks @IyaadDev for reporting the issue

@DarhkVoyd
Copy link
Member

@IyaadDev Hey, Could you skim over the docs pages and also check if this is broken somewhere else too, to avoid redundant similar issues and possibly fix this everywhere?

@RonakSurana-2001
Copy link

Can I work On resolving this issue

@RonakSurana-2001
Copy link

This is also happening on https://json-schema.org/overview/use-cases

@IyaadDev
Copy link
Contributor Author

Yep, will be posting links affected with this tomorrow

@IyaadDev
Copy link
Contributor Author

Several pages have this faulty code snippet,

@DhairyaMajmudar
Copy link
Member

The component here is used into layout so if there's problem on one page it will be problem in other corresponding pages as well.

@arpitkuriyal
Copy link
Contributor

arpitkuriyal commented Oct 18, 2024

@DhairyaMajmudar I can do this can you assign this to me?

@IyaadDev
Copy link
Contributor Author

IyaadDev commented Oct 19, 2024

I've looked at all the pages which contain this variable with the assigned value before:

const markdownFile = '_indexPage';

Some of the links correctly return the source code, others return page not found.

Here are the links which use the markdownFile as _indexPage


https://json-schema.org/learn

Contribution: https://github.com/json-schema-org/website/blob/main/pages/learn/_index.md (Incorrect)

Correct page: https://github.com/json-schema-org/website/blob/main/pages/learn/index.page.tsx


https://json-schema.org/overview/case-studies

Contribution: https://github.com/json-schema-org/website/blob/main/pages/overview/case-studies/_index.md (Incorrect)

Correct page: https://github.com/json-schema-org/website/blob/main/pages/overview/case-studies/index.page.tsx


https://json-schema.org/specification/migration

Contribution: https://github.com/json-schema-org/website/blob/main/pages/specification/migration/_index.md (Correct)


https://json-schema.org/understanding-json-schema

Contribution: https://github.com/json-schema-org/website/blob/main/pages/understanding-json-schema/_index.md (Correct)


https://json-schema.org/overview/use-cases

Contribution: https://github.com/json-schema-org/website/blob/main/pages/overview/use-cases/_index.md (Incorrect)

Correct page: https://github.com/json-schema-org/website/blob/main/pages/overview/use-cases/index.page.tsx


https://json-schema.org/specification/release-notes

Contribution: https://github.com/json-schema-org/website/blob/main/pages/specification/release-notes/_index.md (Correct)


https://json-schema.org/specification/json-hyper-schema

Contribution: https://github.com/json-schema-org/website/blob/main/pages/specification/json-hyper-schema/_index.md (Correct)


https://json-schema.org/understanding-json-schema/reference

Contribution: https://github.com/json-schema-org/website/blob/main/pages/understanding-json-schema/reference/_index.md (Correct)


@IyaadDev
Copy link
Contributor Author

I'll be submitting a pr soon with a fix for affected pages

@Yashwanth1906
Copy link

I have cleared the bug. Can i send a pr?

@IyaadDev
Copy link
Contributor Author

IyaadDev commented Oct 19, 2024

Sure, @Yashwanth1906
waiting for @Yashwanth1906 for a pr,

@Yashwanth1906
Copy link

I need a small help. Im struck with this error when I'm trying to commit to my forked repo.

git commit -m "link-redirect-fix"
Performing code styling, testing, and building processes before committing
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
ESLint Check Failed. Run yarn run lint:fix, Review the listed issues, make the required adjustments, add the changes, and attempt to commit again.
husky - pre-commit script failed (code 1)

can u pls help me with this? Sry Im completely new to open source.

@arpitkuriyal
Copy link
Contributor

@Yashwanth1906 i also faced this while i was setting up the repo . you can solve it by enabling corepack .Try "enable corepack " then see the version of the yarn if it is showing 4.4.0 than you are good to go and if you still see the yarn version 1.22.22 you should first uninstall yarn then try it again

@Yashwanth1906
Copy link

@arpitkuriyal Thank you so much for helping me out.

@Yashwanth1906
Copy link

Waiting for the feedback!

@DhairyaMajmudar DhairyaMajmudar added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Oct 19, 2024
@Yashwanth1906
Copy link

@DhairyaMajmudar I have created a new pull request making all the changes you specified

@Yashwanth1906
Copy link

Waiting for you feedback!

@DhairyaMajmudar
Copy link
Member

@DhairyaMajmudar I have created a new pull request making all the changes you specified

Thanks! but you ne need to again fork the repo and create a new pull request to do the suggested changes you can commit the change in the same branch using git commands : )

@Yashwanth1906
Copy link

@DhairyaMajmudar Ok sure

@Yashwanth1906
Copy link

@DhairyaMajmudar I have sent a pr. Waiting for your feedback!

@IyaadDev
Copy link
Contributor Author

@Yashwanth1906 could you link the pr here pls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Indicates that the issue is a bug or defect. good first issue Good for newcomers Hacktoberfest Issues accepeted Hacktoberfest'24 Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
None yet
6 participants