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

Prismic Gatsby V6 links not resolving #192

Open
jodiedoubleday opened this issue Jul 17, 2023 · 0 comments
Open

Prismic Gatsby V6 links not resolving #192

jodiedoubleday opened this issue Jul 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jodiedoubleday
Copy link

Versions

  • gatsby-source-prismic: 6.0.0
  • gatsby-plugin-prismic-previews: 6.0.0
  • @prismicio/react: 2.7.1
  • gatsby: 5.11.0
  • Node.js: 18.16.0

Reproduction

Repo is private but can give access if requested

Steps to reproduce

I'm using the latest gatsby-source-prismic and @rismicio/react plugins. Whenever I add a link in a richText field the link doesn't resolve, instead it just links to the page you are on. This works if I downgrade @prismicio/react to 2.5.2 it works correctly, I'm not sure if it's an issue on this repo or Gatsby Prismic, I have made a duplicate issue on the Gatsby repo - prismicio/prismic-gatsby#538.

Im using the plugin in the following way...

<PrismicLink field={slice.primary.button_link}>
  LINK
</PrismicLink>

I think previously it was mentioned that this might be the incorrect way of using this plugin and instead using...

<PrismicLink href={slice.primary.button_link.url}>
  LINK
</PrismicLink>

If I'm using it incorrectly, lease let me know and I'll adjust the code.

What is expected?

richText links would resolve to the correct lace as with previous versions.

What is actually happening?

The link doesn't resolve and instead links to itself.

@jodiedoubleday jodiedoubleday added the bug Something isn't working label Jul 17, 2023
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
None yet
Development

No branches or pull requests

1 participant