cakephp routing - pages_controller/home.ctp error only on debug=0 -


When the core.php debug is set to 1 or 2 and I browse the root of my cakefeed site, provided The page is correct, i.e. Pagescenter default () verb -> home.ctp

However, if I change the debug to 0 then I get the following error:

Error: The requested address '/' was not found on this server.

My router.fp file is included in:

  router :: connect ('/', array ('controller' = 'gt;' page ',' Verb '= & gt;' display ',' home ')); / ** * ... and the rest 'page' controller's URL connect * / router :: connect ('/ pages / *', array ('controller' = & gt; 'page', 'verb' = & gt; ; 'Display'));  

I have tried to remove all cache files and remove CAKE cookies, and other actions are expected when traveling directly, for example, / user, / Groups, etc. The problem occurs when the root '/'.

I am using CCPP 1.3.4 and ACL + ATH.

Edit ** I am including code from pages_controller.php (default) function

  / ** * Displays the view * * @ What is the ultimate composite page to display * @ login public * / function display () {$ path = funny_gate_argain (); $ Count = count ($ path); If (! $ Count) {$ this- & gt; Redirect ('/'); } $ Page = $ subpage = $ title_for_layout = null; If (! Empty ($ path [0])) {$ page = $ path [0]; } If (! Empty ($ path [1])) {$ subpage = $ path [1]; } If (! Empty ($ path [$ count - 1])) {$ title_for_layout = Inflector :: humanize ($ path [$ count - 1]); } $ This- & gt; Set (compact ('page', 'subpage', 'title_for_ layout')); $ This- & gt; Render (implode ('/', $ path)); }   

OK, the answer is very embarrassing: home.ctp has the following code :

  if (configured :: read () == 0): $ this-> Cakear ('error404'); end if;  

Configure :: read read by defug debug () - so it throws an error if debug is set to 0.

Thank you for Benjamin on the right track. The cake is great and unless you know the basic information, it is furious!


Comments