I have started working on a new app with cakephp 1.2.0.7296 RC2.
I would like to use the p28n controller/component which works great
with my other apps (1.2.0.5427alpha). As soon as I "plug" in the code
and routes my app crashes. I get an infinite redirect error.
I have the following setup:
-----------
Auth component in app_controller:
function beforeFilter(){
Security::setHash("md5");
$this->Auth->fields = array('username' => 'username',
'password' =>
'password');
$this->Auth->loginAction = array('controller' => 'users',
'action'
=> 'login');
$this->Auth->loginRedirect = array('controller' => 'users',
'action'
=> 'account');
$this->Auth->logoutRedirect = '/users/login';
$this->Auth->loginError = 'Invalid username / password
combination.
Please try again';
$this->Auth->authorize = 'controller';
$this->Auth->allow('change','shuntRequest');
// Additional criteria for loging.
$this->Auth->userScope = array('User.active' => 1); //user
needs to
be active.
//Pass auth component data over to view files
$this->set('Auth', $this->Auth->user());
}
-----------
Routing:
routes.php:
Router::connect('/(?i:lang)/*', array('controller' => 'p28n', 'action'
=> 'change'));
//forgiving routes that allow users to change the lang of any page
Router::connect('/en?/*', array('controller' => "p28n", 'action' =>
"shuntRequest", 'lang' => 'en'));
//forgiving routes that allow users to change the lang of any page
Router::connect('/deu/*', array( 'controller' => "p28n", 'action' =>
"shuntRequest", 'lang' => 'de' ));
Is anyone expericing these issues or has successfully used P28n as
described in the bakery article with cake 1.2 rc2
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---