Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

No output with multi-language sites #25

Open
99ster opened this issue Sep 10, 2018 · 2 comments
Open

No output with multi-language sites #25

99ster opened this issue Sep 10, 2018 · 2 comments
Labels

Comments

@99ster
Copy link

99ster commented Sep 10, 2018

The XML file is just blank on multi-language sites... :(

@mrnebbi
Copy link
Contributor

mrnebbi commented Jul 28, 2020

I'm also having this problem, and am wondering if it's related to the deletion of site from the sites list. We had 5 languages for our site, but dropped the second one.

Exception (Exception) 'yii\base\Exception' with message 'Invalid site ID: 2' 

in /PATH/vendor/craftcms/cms/src/helpers/UrlHelper.php:314

Stack trace:
#0 /PATH/vendor/dolphiq/sitemap/src/controllers/SitemapController.php(189): craft\helpers\UrlHelper::siteUrl('page-ur...', NULL, NULL, 2)
#1 /PATH/vendor/dolphiq/sitemap/src/controllers/SitemapController.php(106): dolphiq\sitemap\controllers\SitemapController->getUrl('page-ur...', '2')
#2 [internal function]: dolphiq\sitemap\controllers\SitemapController->actionIndex()
#3 /PATH/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#4 /PATH/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#5 /PATH/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('index', Array)
#6 /PATH/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('index', Array)
#7 /PATH/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('sitemap/sitemap...', Array)
#8 /PATH/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('sitemap/sitemap...', Array)
#9 /PATH/vendor/craftcms/cms/src/web/Application.php(284): yii\web\Application->handleRequest(Object(craft\web\Request))
#10 /PATH/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /PATH/web/index.php(21): yii\base\Application->run()
#12 {main}

@mrnebbi
Copy link
Contributor

mrnebbi commented Jul 28, 2020

I can confirm my issue is caused by a deleted site. Changing the dateDeleted column in the the craft_sites table fixes the issue. Reinstating the dateDeleted causes the problem to reappear.

mrnebbi added a commit to mrnebbi/craft3-plugin-sitemap that referenced this issue Jul 28, 2020
This fixes an issue (Dolphiq#25) where deleted sites would be included in sitemap generation, causing an error to be thrown.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants