Plugin appController beforeFilter() action doesn't work anymore

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin appController beforeFilter() action doesn't work anymore

Sam Clauw-2
Since my update from CakePhp 2.3. to CakePhp 2.7., my beforeFilter() action in pluginAppController doesn't work anymore:

<?php

class CoasterCmsAppController extends AppController
{
   
public $helpers = array(
       
'Html',
       
'Form',
       
'Session'
   
);
   
   
public $components = array(
       
'Session',
       
'Paginator',
       
'Auth' => array(
           
'loginAction' => array(
               
'plugin' => 'coaster_cms',
               
'controller' => 'users',
               
'action' => 'login'
           
),
           
'loginRedirect' => array(
               
'plugin' => 'coaster_cms',
               
'controller' => 'attractions',
               
'action' => 'index'
           
),
           
'authenticate' => array(
               
'Form' => array(
                   
'passwordHasher' => 'Blowfish'
               
)
           
),
           
'authError' => 'No rights to visit this page.'
       
)
   
);
   
   
public function beforeFilter()
   
{
debug
('test'); // No "test" output in any of my plugin actions
        parent
::beforeFilter()
   
}
}

?>

Does anybody knows what could possibly go wrong in my application that causes this?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin appController beforeFilter() action doesn't work anymore

Rob Maurer
There are changes made with each minor release that can affect your app; start here (http://book.cakephp.org/2.0/en/appendices.html) to see them listed all in one place. - Rob Maurer

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin appController beforeFilter() action doesn't work anymore

Sam Clauw-2
I didn't find out which release changes caused the problem.
But yesterday, I finally got the answar. When I changed  the "beforeFilter" tot "beforeRender", it worked again!

Thanks anyway for the help!

Op donderdag 22 oktober 2015 12:13:17 UTC+2 schreef Rob Maurer:
There are changes made with each minor release that can affect your app; start here (<a href="http://book.cakephp.org/2.0/en/appendices.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fbook.cakephp.org%2F2.0%2Fen%2Fappendices.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHq8ljNGt-ryko6nyZl8Iq2FwjzSw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fbook.cakephp.org%2F2.0%2Fen%2Fappendices.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHq8ljNGt-ryko6nyZl8Iq2FwjzSw&#39;;return true;">http://book.cakephp.org/2.0/en/appendices.html) to see them listed all in one place. - Rob Maurer

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.