This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Invalid site ID: 2 #61
Comments
I would say in function getUrl in dolphiq/sitemap/src/controllers/SitemapController.php in the following function check UrlHelper::siteUrl is not null and is valid before returning it?
OR maybe its a problem in SitemapController.php getUrl() because in fact if getUrl() which is $alternateLoc === null you have continue instead of stop.
|
Actually its even before the continue... Craft reports invalid siteId in URL helper, before the continue, so your plugin cant even call UrlHelper::siteUrl if the siteId is invalid |
This is how I fixed it. In function getUrl in SitemapController line 184:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have disabled "Enable on the front end" for a site, because it is not live whilst waiting for the translations. It is site ID 2.
But the xml sitemap plugin is still trying to generate a sitemap for it, and as such, returns an error due to the UrlHelper::siteUrl in your plugin returning an invalid site id.
I assume your code is not checking if a site is enabled on front end or not.
Is it possible this can be fixed, because we are unable to generate a sitemap now, not until we enable the other site.
Thanks
The text was updated successfully, but these errors were encountered: