{"action":"created","issue":{"url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/24","labels_url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/24/comments","events_url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/24/events","html_url":"https://github.com/nenad-zivkovic/yii2-advanced-template/issues/24","id":112995372,"number":24,"title":"Add a new application","user":{"login":"sabkaraja","id":1324580,"avatar_url":"https://avatars.githubusercontent.com/u/1324580?v=3","gravatar_id":"","url":"https://api.github.com/users/sabkaraja","html_url":"https://github.com/sabkaraja","followers_url":"https://api.github.com/users/sabkaraja/followers","following_url":"https://api.github.com/users/sabkaraja/following{/other_user}","gists_url":"https://api.github.com/users/sabkaraja/gists{/gist_id}","starred_url":"https://api.github.com/users/sabkaraja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabkaraja/subscriptions","organizations_url":"https://api.github.com/users/sabkaraja/orgs","repos_url":"https://api.github.com/users/sabkaraja/repos","events_url":"https://api.github.com/users/sabkaraja/events{/privacy}","received_events_url":"https://api.github.com/users/sabkaraja/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-23T10:38:21Z","updated_at":"2015-10-23T11:12:11Z","closed_at":"2015-10-23T11:12:11Z","body":"Hi\r\n\r\nHow to add a new application (in addition to frontend, backend, console) under the main project bundle.\r\n\r\nThe way I did was copy root backend & _protected/backend as **mobile** and changing the name spaces backend to api.\r\n\r\nBut when I launch the site as http://localhost/demo/mobile/, I get the following error \r\n\r\n> An Error occurred while handling another error:\r\nexception 'yii\\base\\InvalidRouteException' with message 'Unable to resolve the request \"site/error\".' in C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\base\\Module.php:461\r\nStack trace:\r\n#0 C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\web\\ErrorHandler.php(85): yii\\base\\Module->runAction('site/error')\r\n#1 C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\base\\ErrorHandler.php(109): yii\\web\\ErrorHandler->renderException(Object(yii\\web\\NotFoundHttpException))\r\n#2 [internal function]: yii\\base\\ErrorHandler->handleException(Object(yii\\web\\NotFoundHttpException))\r\n#3 {main}\r\n> Previous exception:\r\nexception 'yii\\base\\InvalidRouteException' with message 'Unable to resolve the request \"site/login\".' in C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\base\\Module.php:461\r\nStack trace:\r\n#0 C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\web\\Application.php(84): yii\\base\\Module->runAction('site/login', Array)\r\n#1 C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\base\\Application.php(375): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))\r\n#2 C:\\WAMP\\www\\demo\\mobile\\index.php(18): yii\\base\\Application->run()\r\n#3 {main}\r\n> Next exception 'yii\\web\\NotFoundHttpException' with message 'Page not found.' in C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\web\\Application.php:96\r\nStack trace:\r\n#0 C:\\WAMP\\www\\demo\\ _protected\\vendor\\yiisoft\\yii2\\base\\Application.php(375): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))\r\n#1 C:\\WAMP\\www\\demo\\mobile\\index.php(18): yii\\base\\Application->run()\r\n#2 {main}\r\n"},"comment":{"url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/comments/150545515","html_url":"https://github.com/nenad-zivkovic/yii2-advanced-template/issues/24#issuecomment-150545515","issue_url":"https://api.github.com/repos/nenad-zivkovic/yii2-advanced-template/issues/24","id":150545515,"user":{"login":"sabkaraja","id":1324580,"avatar_url":"https://avatars.githubusercontent.com/u/1324580?v=3","gravatar_id":"","url":"https://api.github.com/users/sabkaraja","html_url":"https://github.com/sabkaraja","followers_url":"https://api.github.com/users/sabkaraja/followers","following_url":"https://api.github.com/users/sabkaraja/following{/other_user}","gists_url":"https://api.github.com/users/sabkaraja/gists{/gist_id}","starred_url":"https://api.github.com/users/sabkaraja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabkaraja/subscriptions","organizations_url":"https://api.github.com/users/sabkaraja/orgs","repos_url":"https://api.github.com/users/sabkaraja/repos","events_url":"https://api.github.com/users/sabkaraja/events{/privacy}","received_events_url":"https://api.github.com/users/sabkaraja/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T11:12:11Z","updated_at":"2015-10-23T11:12:11Z","body":"Spoke too early. I hadnt changed the \\common\\config\\bootstrap.php to include the newly added application\r\n\r\n> Yii::setAlias('mobile', dirname(dirname(__DIR__)) . '/mobile');\r\n\r\nNow its working. "}}