site.php conflict for panel in Kirby CMS -


kirby cms supports non default file structure. http://getkirby.com/docs/advanced/customized-folder-setup

when introduce following content site.php file:

// changing directory $kirby->roots->content = $kirby->roots()->index() . ds . 'vendor/client-content';  // changing url $kirby->urls->content = $kirby->urls()->index() . '/client/mindfulness-content'; 

the panel redirects panel\panel\install or panel\panel\login not exist because has unnecessary redirect. pretty copy , pasted docs.

if try panel\install or panel\login doesn't try , redirect styles not loaded.

if attempt logon produces 'invalid route' exception:

/panel/app/panel.php:203 stack trace: #0 /panel/index.php(47): panel->launch() #1 {main} thrown in /panel/app/panel.php on line 203 

if leave site.php following happy:

<?php  $kirby = kirby(); 

i'm running following php on apache:

php 5.4.16 (cli) (built: oct 31 2014 12:59:36)  copyright (c) 1997-2013 php group zend engine v2.4.0, copyright (c) 1998-2013 zend technologies 

this problem has been reported ngnx https://github.com/getkirby/panel/issues/287

reasons folder structure:

in case wanted load content git repo using composer. give made deployment process easier manage cli , lets content maintainer proceed independently.

this bug current version of kirby. has simple fix supplied kirby's creator @bastianallgeier

the following variable needs defined panel work.

$kirby->urls->index  

if there variety of domains , sub-domains work following snippet added site.php works great.

<?php  $kirby = kirby();  switch(url::host()) {   case 'example-a.com':       $kirby->urls->index = 'http://example-a.com';       …       break;  case 'example-b.com':       $kirby->urls->index = 'http://example-b.com';       …       break;  case 'sub.example-b.com':       $kirby->urls->index = 'http://sub.example-b.com';       …       break; } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -