0

I have been trying to get a Git clone of my companies website running so we can make small changes locally and send it to the developer to save costs, but I can't get the website up and running. My process so far was:

  1. Install composer (globally)
  2. Clone repo
  3. Run composer in folder
  4. Set up MAMP server
  5. Import database dump
  6. Create and connect .env to database
  7. Direct browser to localhost/admin

This is the error I get in the browser HTML

An Error occurred while handling another error:
yii\base\InvalidArgumentException: Invalid site: dutch in C:PATH\vendor\craftcms\cms\src\services\Sites.php:474
Stack trace:
#0 C:PATH\vendor\yiisoft\yii2\base\Component.php(180): craft\services\Sites->setCurrentSite('dutch')
#1 C:PATH\vendor\yiisoft\yii2\BaseYii.php(546): yii\base\Component->__set('currentSite', 'dutch')
#2 C:PATH\vendor\yiisoft\yii2\base\BaseObject.php(107): yii\BaseYii::configure(Object(craft\services\Sites), Array)
#3 [internal function]: yii\base\BaseObject->__construct(Array)
#4 C:PATH\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#5 C:PATH\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('craft\\services\\...', Array, Array)
#6 C:PATH\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('craft\\services\\...', Array, Array)
#7 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#8 C:PATH\vendor\yiisoft\yii2\base\Module.php(742): yii\di\ServiceLocator->get('sites', true)
#9 C:PATH\vendor\craftcms\cms\src\web\Application.php(348): yii\base\Module->get('sites', true)
#10 C:PATH\vendor\craftcms\cms\src\base\ApplicationTrait.php(1124): craft\web\Application->get('sites')
#11 C:PATH\vendor\craftcms\cms\src\web\Request.php(175): craft\web\Application->getSites()
#12 C:PATH\vendor\yiisoft\yii2\base\BaseObject.php(109): craft\web\Request->init()
#13 [internal function]: yii\base\BaseObject->__construct(Array)
#14 C:PATH\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#15 C:PATH\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
#16 C:PATH\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
#17 C:PATH\vendor\craftcms\cms\src\config\app.web.php(13): yii\BaseYii::createObject(Array)
#18 [internal function]: {closure}()
#19 C:PATH\vendor\yiisoft\yii2\di\Container.php(508): call_user_func_array(Object(Closure), Array)
#20 C:PATH\vendor\yiisoft\yii2\BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#21 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#22 C:PATH\vendor\yiisoft\yii2\base\Module.php(742): yii\di\ServiceLocator->get('request', true)
#23 C:PATH\vendor\craftcms\cms\src\web\Application.php(348): yii\base\Module->get('request', true)
#24 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(74): craft\web\Application->get('request')
#25 C:PATH\vendor\yiisoft\yii2\web\ErrorHandler.php(502): yii\di\ServiceLocator->__get('request')
#26 C:PATH\vendor\yiisoft\yii2\web\ErrorHandler.php(115): yii\web\ErrorHandler->shouldRenderSimpleHtml()
#27 C:PATH\vendor\craftcms\cms\src\web\ErrorHandler.php(137): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
#28 C:PATH\vendor\yiisoft\yii2\base\ErrorHandler.php(111): craft\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
#29 C:PATH\vendor\craftcms\cms\src\web\ErrorHandler.php(68): yii\base\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
#30 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
#31 {main}
Previous exception:
yii\base\InvalidArgumentException: Invalid site: dutch in C:PATH\vendor\craftcms\cms\src\services\Sites.php:474
Stack trace:
#0 C:PATH\vendor\yiisoft\yii2\base\Component.php(180): craft\services\Sites->setCurrentSite('dutch')
#1 C:PATH\vendor\yiisoft\yii2\BaseYii.php(546): yii\base\Component->__set('currentSite', 'dutch')
#2 C:PATH\vendor\yiisoft\yii2\base\BaseObject.php(107): yii\BaseYii::configure(Object(craft\services\Sites), Array)
#3 [internal function]: yii\base\BaseObject->__construct(Array)
#4 C:PATH\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#5 C:PATH\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('craft\\services\\...', Array, Array)
#6 C:PATH\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('craft\\services\\...', Array, Array)
#7 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#8 C:PATH\vendor\yiisoft\yii2\base\Module.php(742): yii\di\ServiceLocator->get('sites', true)
#9 C:PATH\vendor\craftcms\cms\src\web\Application.php(348): yii\base\Module->get('sites', true)
#10 C:PATH\vendor\craftcms\cms\src\base\ApplicationTrait.php(1124): craft\web\Application->get('sites')
#11 C:PATH\vendor\craftcms\cms\src\web\Request.php(175): craft\web\Application->getSites()
#12 C:PATH\vendor\yiisoft\yii2\base\BaseObject.php(109): craft\web\Request->init()
#13 [internal function]: yii\base\BaseObject->__construct(Array)
#14 C:PATH\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#15 C:PATH\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
#16 C:PATH\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
#17 C:PATH\vendor\craftcms\cms\src\config\app.web.php(13): yii\BaseYii::createObject(Array)
#18 [internal function]: {closure}()
#19 C:PATH\vendor\yiisoft\yii2\di\Container.php(508): call_user_func_array(Object(Closure), Array)
#20 C:PATH\vendor\yiisoft\yii2\BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#21 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#22 C:PATH\vendor\yiisoft\yii2\base\Module.php(742): yii\di\ServiceLocator->get('request', true)
#23 C:PATH\vendor\craftcms\cms\src\web\Application.php(348): yii\base\Module->get('request', true)
#24 C:PATH\vendor\yiisoft\yii2\web\Application.php(160): craft\web\Application->get('request')
#25 C:PATH\vendor\craftcms\cms\src\helpers\App.php(488): yii\web\Application->getRequest()
#26 C:PATH\vendor\craftcms\cms\src\config\app.php(207): craft\helpers\App::logConfig()
#27 [internal function]: {closure}()
#28 C:PATH\vendor\yiisoft\yii2\di\Container.php(508): call_user_func_array(Object(Closure), Array)
#29 C:PATH\vendor\yiisoft\yii2\BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#30 C:PATH\vendor\yiisoft\yii2\di\ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#31 C:PATH\vendor\yiisoft\yii2\base\Module.php(742): yii\di\ServiceLocator->get('log', true)
#32 C:PATH\vendor\craftcms\cms\src\web\Application.php(348): yii\base\Module->get('log', true)
#33 C:PATH\vendor\yiisoft\yii2\base\Application.php(508): craft\web\Application->get('log')
#34 C:PATH\vendor\craftcms\cms\src\base\ApplicationTrait.php(1267): yii\base\Application->getLog()
#35 C:PATH\vendor\craftcms\cms\src\web\Application.php(109): craft\web\Application->_preInit()
#36 C:PATH\vendor\yiisoft\yii2\base\BaseObject.php(109): craft\web\Application->init()
#37 C:PATH\vendor\yiisoft\yii2\base\Application.php(206): yii\base\BaseObject->__construct(Array)
#38 C:PATH\vendor\craftcms\cms\src\web\Application.php(100): yii\base\Application->__construct(Array)
#39 [internal function]: craft\web\Application->__construct(Array)
#40 C:PATH\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#41 C:PATH\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#42 C:PATH\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#43 C:PATH\vendor\craftcms\cms\bootstrap\bootstrap.php(248): yii\BaseYii::createObject(Array)
#44 C:PATH\vendor\craftcms\cms\bootstrap\web.php(52): require('C:\\Users\\KVdL P...')
#45 C:PATH\web\index.php(47): require('C:\\Users\\P...')
#46 {main}

(Path anonymized for privacy)

I'm not very experienced in handling serverside and PHP errors as my knowledge covers mostly front-end

Thanks in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.