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

Only one form node is ever built #1

Closed
ynnoj opened this issue Oct 23, 2020 · 4 comments · Fixed by #2
Closed

Only one form node is ever built #1

ynnoj opened this issue Oct 23, 2020 · 4 comments · Fixed by #2

Comments

@ynnoj
Copy link
Contributor

ynnoj commented Oct 23, 2020

Hey! Thanks for creating this source plugin.

I've been using it to implement HubSpot forms on our website and noticed that only one HubspotForm node is ever generated, despite there being more than a dozen available on our account.

Looking at the source further, it seems that there's a conflict using the createNode action because the id passed is not unique. As per Gatsby docs, id should be globally unique.

id: item.portalId.toString(),

We should use the guid field returned from HubSpot.

@jamaljeantobias
Copy link
Owner

This totally makes sense that you found this. Was only using it on one form at the time. Thank you so much for this fix :)

@ynnoj
Copy link
Contributor Author

ynnoj commented Oct 23, 2020

Thanks! Let me know if you're happy accepting other PRs.

@jamaljeantobias
Copy link
Owner

jamaljeantobias commented Oct 23, 2020 via email

@ynnoj
Copy link
Contributor Author

ynnoj commented Oct 27, 2020

@jamaljeantobias You'll need to publish a version to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants