-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Docs] Anchor parameter is stripped out of redirected links part 1
#2139
[Docs] Anchor parameter is stripped out of redirected links part 1
#2139
Comments
Thanks @aswanson-nr . There are a lot of redirects on the site and a lot of anchor links, so a fix here will be very helpful! |
from @zstix I believe those redirects come from https://www.gatsbyjs.com/docs/reference/config-files/actions/#createRedirect in Gatsby. Not sure if we have the option to pass along the extra URL params |
We netted out that this is still a problem in Sprint Planning today |
I'm going to bump Gatsby about it, and try to get an ETA of when this may be available in Gatsby. |
Ops, sorry I was meant to respond to different issue - sorry for confussion |
This may be a moot point now if the Gatsby update fixes this, but I figured out a workaround for this, i've got this working in Here's the branch with the changes I made: https://github.com/newrelic/docs-website/tree/ruairi/anchor-redirect I used sessionStorage and a few of the Browser API's to achieve this. screen-recording-2021-05-19-1502.webm.mp4Maybe it has something to do with the fact that it throws a Notes: |
I want to correct myself - I meant to write this to different (but still related to redirects) issue ( #1874 ). For forwarding query params and hash, we didn't implement that in Gatsby yet |
Hey @roadlittledawn , let's look at this for a sustaining ticket in the next sprint or two. |
We have a sustaining epic planned in January to kick off Q4, this is a good candidate for that epic, so added it. |
looks like this was fixed in gatsby v3.13, so upgrading to this may fix this? https://www.gatsbyjs.com/docs/reference/release-notes/v3.13/#notable-bugfixes--improvements |
We are planning an upgrade to gatsby 4 for the docs site in our sustaining sprint, that should take care of this I believe. |
@roadlittledawn I did try that when it was initially released but it didn't seem to fix the issue |
closing for a nice fresh issue out of the oven 🍪 as this has so much history, we'll work from a new issue to resolve this soon |
part 1
Related Gatsby Issue
gatsbyjs/gatsby#27582
Release Date
Description
The redirects generated by the
gatsby-plugin-meta-redirect
plugin do not remove the trailing slash. This causes any#anchor
parameters to be stripped out of the link and most likely applies to query parameters as well.Steps to reproduce
#functions
was removed from the URL and the page did not scroll down to that sectionExpected
When a user clicks on the link in the example above, they should land on the Functions section of the page.
Other information
Acceptance Criteria
Gatsby 3.10
when available.develop
branch in tofeature/o11y-packs
The text was updated successfully, but these errors were encountered: