I'm running `Yii2` and I have up until recently been working within a single application; however I needed to start adding an admin area and I didn't start with the advanced application template, just the basic one, but still move some directories around then and everything worked fine.

Now I have a directory structure like this...

```
admin/
    system/
        controllers/
        models/
        views/
    index.php
common/
    vendor/
    .bowerrc
    composer.json
    composer.lock
    yii
    yii.bat
console/
css/
images/
js/
system/
    controllers/
    models/
    views/
index.php

```

So as you can see, the `root` dir acts as the `web` dir and the `system/` dir acts as the `application` dir for the `frontend`.

The *frontend* of the site works absolutely fine, but I am having issues with the `admin` section.

Within the `admin` dir, the `base` dir acts as the `web` directory the `admin/system/` acts as the `application` directory.

This is the error I get when attempting to access: `admin/staff/login`

> 
> Invalid Parameter – yii\base\InvalidParamException
>  The file or directory to be published does not exist: common\vendor\bower/jquery/dist
> 
> 
> 

This is the contents of the `admin/index.php` file:

```
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

require(__DIR__ . '/../common/vendor/autoload.php');
require(__DIR__ . '/../common/vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../common/config/bootstrap.php');
require(__DIR__ . '/../common/config/constants.php');

$config = require(__DIR__ . '/system/config/main.php');

(new yii\web\Application($config))->run();

```

Here are the contents of the `admin/system/config/main.php` file:

```
<?php

$params = require(__DIR__ . '/../../../common/config/params.php');

$config = [
    'id' => 'basic',
    'basePath' => dirname(__DIR__),
    'version' => '0.1',
    'vendorPath' => 'common\vendor',
    'defaultRoute' => 'site/index',
    'bootstrap' => [
                    'log',
                    'common\base\Settings',
    ],
    'components' => [
        'request' => [
            'enableCookieValidation' => false,
            'enableCsrfCookie' => false,
            'csrfParam' => '_admin_csrf',
        ],
        'view' => [
            'theme' => [
                // This data is setup dynamically via the bootstrapping process
            ],
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        'user' => [
            'identityClass' => 'app\models\Staff',
            'enableAutoLogin' => false,
            'loginUrl' => 'staff/login',
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'session' => [
            'name' => 'PHPADMINSESSID',
        ],
        'formatter' => [

        ],      
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => false,
            // The below viewPath only acts as the base dir and will be changed during the bootstrap process to append the correct locale dir to it
            'viewPath' => '@common/mail',
            // These are relative to the final value of viewPath
            'htmlLayout' => 'layouts/default-html',
            'textLayout' => 'layouts/default-text',
        ],      
        'authManager' => [
            'class' => 'app\components\AuthManager',
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error'],
                    'logFile' => '@app/runtime/logs/errors.log',
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['warning'],
                    'logFile' => '@app/runtime/logs/warnings.log',
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['info'],
                    'logFile' => '@app/runtime/logs/info.log',
                    'enabled' => false,
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['trace'],
                    'logFile' => '@app/runtime/logs/trace.log',
                    'enabled' => false,
                ],              
            ],
        ],      
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'enableStrictParsing' => false,
            'rules' => [

            ],
        ],
        'assetManager' => [
            'bundles' => [
                'yii\web\JqueryAsset' => [
                    'js'=>[]
                ],
                'yii\bootstrap\BootstrapPluginAsset' => [
                    'js'=>[]
                ],
                'yii\bootstrap\BootstrapAsset' => [
                    'css' => [],
                ],
            ],
        ],
        'i18n' => [
            'translations' => [         
                '*' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                    'basePath' => '@common/languages',
                    //'on missingTranslation' => ['common\components\TranslationEventHandler', 'handleMissingTranslation'],
                ],
            ],
        ],          
        'db' => require(__DIR__ . '/../../../common/config/db.php'),        
    ],
    'params' => $params,
];

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
                                   'class' => 'yii\debug\Module',
                                   'allowedIPs' => ['127.0.0.1','::1']
                                   ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
                                   'class' => 'yii\gii\Module',
                                   'allowedIPs' => ['127.0.0.1','::1']
                                   ];
}

return $config;

```

I have deleted by `common/vendor` dir and ran `composer install` again but no change.

Do I have some paths wrong somewhere or what is the problem?