Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I stop that cakePHP 2.1 redirects all my new views?
    primarykey
    data
    text
    <p>I hope you can forgive my bad english, I hate auto translating services... So I write by my own. xD</p> <p>I am working in cakePHP 2.1, but the code is not mine. For some reason, when I create a new view with its correct controller created, the system redirectsme to the root. So, I cannot create a new view. Of course, the view exist in the controller becouse I add it.</p> <p>For example, I add this code in <code>cake/Controller/DocumentsController.php</code>:</p> <pre><code> function add_pago() { //I code for food. } </code></pre> <p>And I create a new file called <code>cake/Views/Documents/add_pago.ctp</code> with this random code after the php tag:</p> <pre><code> echo "hello, world!"; </code></pre> <p>There's no beforeFilter() function in DocumentsController.php. In AppController.php, the beforeFilter function is shown bellow:</p> <pre><code> public function beforeFilter() { //Configure AuthComponent //$this-&gt;Auth-&gt;allow('display'); $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'users', 'action' =&gt; 'login'); $this-&gt;Auth-&gt;logoutRedirect = array('controller' =&gt; 'users', 'action' =&gt; 'login'); $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'pages', 'action' =&gt; 'display', 'home'); if(!empty($this-&gt;data)) array_walk_recursive($this-&gt;data, array($this, '__whitespace')); } </code></pre> <p>Simple ACL is active. The programmer can't remeber what he did to get this behavior. And I can't figure how to fix this.</p> <p>Do you have any suggestion to find where in the code is programmed this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload