-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Can't find "Edit this page" link #1083
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
Comments
Hi, I would love to take a stab at this. |
Hi @gaearon the issue is in |
is there any chance this bug comes from GH-1065 where it changes graphql formats for path? |
Yes it probably came from that. I am not sure why that was not a breaking change in Gatsby. |
Hi, took a look at this an saw the same issue you have already mentioned. I can see
And |
Not sure if relevant, but Gatsby never passes this case when building for me: https://github.com/reactjs/reactjs.org/blob/master/gatsby/onCreateNode.js#L31 |
Anyone figured it out? |
@gaearon would love to pick this one up if it is available? |
It's available, go for it! Added the in-progress label, just notify here again if you change your mind. You may want to check against the changes in #1104. |
@alexkrolick Will keep you updated, Thanks. |
Feel free to use this as a temp fix if @FadySamirSadek does not find the root cause of why markdownRemark.fields.path is showing up null. I tested this locally, and it looks like it at-least will get all of the edit buttons back up for now. Not sure if it would work after a build, but I have been coding all day, and have no bandwidth for this. Just thought it might help. https://gist.github.com/DZuz14/808c5af1d9120bf860ae56d4ac676506 |
@FadySamirSadek You can use my fix here if you'd like: master...mknepprath:fix-edit-this-page-button It appears to be a Gatsby issue that was fixed in a recent patch. Updating from |
@mknepprath I was thinking the same thing but it generates an error `error GraphQL Error Field "path" of type "File" must have a selection of subfields. Did you mean "path {... }"? file: /Users/fadysadek/Documents/projects/reactjs.org/src/pages/docs/error-decoder.html.js 1 |
|
This is really confusing, I've the same problem in the Gatsby 2 PR #1104. I've no idea why createNodeField({
node,
name: 'path',
value: relativePath + 'whatever', // can't be an empty string and String(relativePath) does not work either
}); I've also tried replicating this with the My best guess is that something is checking if the field is a valid url and then converting it. @KyleAMathews do you have any ideas? |
@FadySamirSadek @alexandernanberg Per gatsbyjs/gatsby#2255, it seems to convert it to a File node due to it being a relative path, so I'd agree that it has something to do with it checking whether it detects that it's a url. @FadySamirSadek Did you pull my branch and get that error? Very strange, because that's the error I was getting until I updated the package and removed the |
Well, this is strange - I switched to
...Is it a difference between our environments? |
@mknepprath I have no idea, tried to delete node_modules and reset npm cache still is not working. If you are confident that the change you made solves this issue please open a PR to solve it till we figure out what is causing this,. Thanks. |
By "reset eveything" does that include removing the |
After further investigation, I realized I still had the version in @alexandernanberg I meant removing |
This has me going in circles! Alright, it's not the version bump of EDIT: The steps I follow to "fix" this are as follows...
You should now be getting the |
Still not finding 'edit this page link' on website. Is it in progress ? |
Fixed by #1226 🎉 |
I thought we had a link like this on every page. I can't find it. Where did it go?
The text was updated successfully, but these errors were encountered: