craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

HTTP 503 – Service Unavailable after upgrade to RC2 #5463

Closed faradaytrs closed 4 years ago

faradaytrs commented 4 years ago

Description

HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException

Steps to reproduce

Upgraded from last craft 3.3 version using composer and made composer update Admin panel is also unaccessible with error: Unknown Property – yii\base\UnknownPropertyException Setting unknown property: craft\events\TemplateEvent::templateMode

Additional info

Log

craft\web\ServiceUnavailableHttpException in /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/Application.php:651
Stack trace:
#0 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/Application.php(222): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#1 /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#2 /Users/imax/PhpstormProjects/globus/web/index.php(21): yii\base\Application->run()
#3 {main}

Admin panel log:

yii\base\UnknownPropertyException: Setting unknown property: craft\events\TemplateEvent::templateMode in /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\BaseObject->__set('templateMode', 'cp')
#1 /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\events\TemplateEvent), Array)
#2 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/View.php(1605): yii\base\BaseObject->__construct(Array)
#3 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/View.php(435): craft\web\View->beforeRenderPageTemplate('_special/dbupda...', Array, 'cp')
#4 /Users/imax/PhpstormProjects/globus/plugins/magic/vendor/craftcms/cms/src/web/Controller.php(243): craft\web\View->renderPageTemplate('_special/dbupda...', Array)
#5 /Users/imax/PhpstormProjects/globus/plugins/magic/vendor/craftcms/cms/src/controllers/TemplatesController.php(128): craft\web\Controller->renderTemplate('_special/dbupda...')
#6 [internal function]: craft\controllers\TemplatesController->actionManualUpdateNotification()
#7 /Users/imax/PhpstormProjects/globus/plugins/magic/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#8 /Users/imax/PhpstormProjects/globus/plugins/magic/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#9 /Users/imax/PhpstormProjects/globus/plugins/magic/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('manual-update-n...', Array)
#10 /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('manual-update-n...', Array)
#11 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/Application.php(290): yii\base\Module->runAction('templates/manua...', Array)
#12 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/Application.php(634): craft\web\Application->runAction('templates/manua...')
#13 /Users/imax/PhpstormProjects/globus/vendor/craftcms/cms/src/web/Application.php(222): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#14 /Users/imax/PhpstormProjects/globus/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#15 /Users/imax/PhpstormProjects/globus/web/index.php(21): yii\base\Application->run()
#16 {main}
andris-sevcenko commented 4 years ago

Can you try nuking the vendor folder, running composer dump-autoload and then running composer update again?

faradaytrs commented 4 years ago

Can you try nuking the vendor folder, running composer dump-autoload and then running composer update again?

i did and it had no effect

andris-sevcenko commented 4 years ago

Is your vendor/craftcms/cms/src/events/TemplateEvent.php file the same as https://github.com/craftcms/cms/blob/3.4/src/events/TemplateEvent.php?

andris-sevcenko commented 4 years ago

@faradaytrs what ended up being the issue?

faradaytrs commented 4 years ago

@faradaytrs what ended up being the issue?

There was a plugin which directly depended on craftcms 3.3. I found out that removing that and running composer update solved the issue.

andris-sevcenko commented 4 years ago

Perfect!