craftcms / spoke-and-chain

Craft CMS + Craft Commerce demo site.
https://craftcms.com/demo?kind=spokeandchain
BSD Zero Clause License
53 stars 28 forks source link

503 service unavailable for anonymous users on all pages #57

Closed alexgit2k closed 3 years ago

alexgit2k commented 3 years ago

Description

If the user is not logged into /admin all pages of the frontend e.g. /bikes show header and footer but in the middle it says Something Went Wrong! Sorry for any inconvenience this may have caused. and the page is returned with HTTP-status 503 Service Unavailable.

[error][yii\web\HttpException:503] craft\web\ServiceUnavailableHttpException in application/vendor/craftcms/cms/src/web/Controller.php:165
Stack trace:
#0 application/vendor/craftcms/cms/src/controllers/TemplatesController.php(71): craft\web\Controller->beforeAction()
#1 application/vendor/yiisoft/yii2/base/Controller.php(179): craft\controllers\TemplatesController->beforeAction()
#2 application/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction()
#3 application/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction()
#4 application/vendor/craftcms/cms/src/web/Application.php(277): yii\base\Module->runAction()
#5 application/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction()
#6 application/vendor/craftcms/cms/src/web/Application.php(262): yii\web\Application->handleRequest()
#7 application/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest()
#8 application/web/index.php(23): yii\base\Application->run()
#9 {main}

The content is only shown when the user is logged into the cms.

Steps to reproduce

  1. Go to www.domain.com/bikes

Additional info

mattstein commented 3 years ago

Looking into it, thanks @alexgit2k!

mattstein commented 3 years ago

It turns out this is an intentional part of our deployment process: the site ships offline and the content seeder turns it on when it’s finished.

Locally, you can either run the seeder with php craft demos/seed (or nitro craft demos/seed) or navigate to SettingsGeneral Settings and switch System Status to “Online”.

alexgit2k commented 3 years ago

Thanks, this information should be also in the README.md.

I wished I had such fast responses for the happy-lager-demo (https://github.com/craftcms/happy-lager/issues)

mattstein commented 3 years ago

You’re right @alexgit2k, thank you. Updated the readme with a step and note for the seeder.