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

Exception when generating sitemap when the current website has only 1 host set up #27

Closed
lequang1024 opened this issue Nov 24, 2021 · 0 comments · Fixed by #32
Closed

Comments

@lequang1024
Copy link

Steps:

  1. a Optimizely CMS 12.1.0 project with 1 host set up as below:
    image
  2. Go To set up Seo Sitemaps, choose Standard site map, click Update/save
  3. Run the Scheduled job to generate sitemaps
  4. Error: Job successfully executed.
    Generated sitemaps:
    Error creating sitemap for "sitemap.xml" appear in History of the Scheduled job, with an exception in Backend: fail: Geta.Optimizely.Sitemaps.XML.SitemapXmlGenerator[0] Error on generating xml sitemap System.ArgumentNullException: Value cannot be null. (Parameter 'uriString') at System.Uri..ctor(String uriString) at Geta.Optimizely.Sitemaps.XML.SitemapXmlGenerator.Generate(SitemapData sitemapData, Boolean persistData, Int32& entryCount)
  5. Sitemap is not generated and it's not accessible

Workaround:
Have a website with multiple hosts, that way when we go to Seo Sitemaps admin, there's a dropdown to choose hosts, then click Update, the SiteUrl is not null anymore. After this, Generating sitemaps work as normal and things work fine.

I think this is a bug because when there is no dropdown to choose the Host, the SiteUrl is not passed into the Api call, and thus the exception occurs.

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.

1 participant