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

gatsby-plugin-sitemap NoURLProtocolError: Protocol is required #12912

Closed
pawelotto opened this issue Mar 28, 2019 · 5 comments
Closed

gatsby-plugin-sitemap NoURLProtocolError: Protocol is required #12912

pawelotto opened this issue Mar 28, 2019 · 5 comments
Labels
good first issue Issue that doesn't require previous experience with Gatsby help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@pawelotto
Copy link

While building the site with gatsby-plugin-sitemap I get the
NoURLProtocolError: Protocol is required
error.

Why?

@wardpeet
Copy link
Contributor

Could you give us some more information about your configuration and maybe just push your code online so we can have a look at it?

Please look at https://github.com/gatsbyjs/gatsby/blob/master/.github/ISSUE_TEMPLATE/bug_report.md to tell us more about this issue.

@wardpeet wardpeet added status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. status: awaiting author response Additional information has been requested from the author labels Mar 28, 2019
@pawelotto
Copy link
Author

I've discovered that this error only occurs when I use a custom query and when I have no siteUrl defined in the siteMetadata. I've been using siteRoot instead of siteUrl and when I add the siteUrl everything works OK.

@wardpeet
Copy link
Contributor

Oh yeah siteUrl is mandatory. It's probably a good idea to throw an error when this happens instead of showing a weird error.

@wardpeet wardpeet added help wanted Issue with a clear description that the community can help with. good first issue Issue that doesn't require previous experience with Gatsby type: bug An issue or pull request relating to a bug in Gatsby and removed status: awaiting author response Additional information has been requested from the author status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. labels Mar 29, 2019
@ryandrew14
Copy link
Contributor

ryandrew14 commented Mar 29, 2019

I will dig into this over the weekend!

wardpeet pushed a commit that referenced this issue Apr 5, 2019
…ing (#13123)

## Description
Throw a more descriptive error when users do not supply a `siteUrl` property when using `gatsby-plugin-sitemap`

## Related Issues
Fixes #12912
@sidharthachatterjee
Copy link
Contributor

Fix for this was published in gatsby-plugin-sitemap@2.0.12 courtesy of @sbardian 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that doesn't require previous experience with Gatsby help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants