I found out what the issue was. I was trying to use the security
component without creating all form items in the form helper.

On Jul 19, 7:19 pm, Mathachew <[EMAIL PROTECTED]> wrote:
> I was advised to add the Security Component to my controller to have
> automatic protection for my submitted forms. However, when I tell my
> controller to use the Security Component and submit a form, I get the
> following error:
>
> Notice (8): Undefined index:  key [CORE_1.2.0.7296-rc2/cake/libs/
> controller/components/security.php, line 525]
>
> Code | Context
>
> $controller     =       UsersController
> UsersController::$name = "Users"
> UsersController::$components = array
> UsersController::$here = "/users/edit/1"
> UsersController::$webroot = "/"
> UsersController::$action = "edit"
> UsersController::$uses = false
> UsersController::$helpers = array
> UsersController::$params = array
> UsersController::$data = array
> UsersController::$paginate = array
> UsersController::$viewPath = "users"
> UsersController::$layoutPath = NULL
> UsersController::$viewVars = array
> UsersController::$pageTitle = false
> UsersController::$modelNames = array
> UsersController::$base = ""
> UsersController::$layout = "default"
> UsersController::$autoRender = true
> UsersController::$autoLayout = true
> UsersController::$Component = Component object
> UsersController::$view = "View"
> UsersController::$ext = ".ctp"
> UsersController::$output = NULL
> UsersController::$plugin = NULL
> UsersController::$cacheAction = false
> UsersController::$persistModel = false
> UsersController::$passedArgs = array
> UsersController::$_log = NULL
> UsersController::$modelClass = "User"
> UsersController::$modelKey = "user"
> UsersController::$Session = SessionComponent object
> UsersController::$Acl = AclComponent object
> UsersController::$Auth = AuthComponent object
> UsersController::$Security = SecurityComponent object
> UsersController::$User = User object
>
>                 }
>             }
>             $token = $controller->data['__Token']['key'];
>
> SecurityComponent::__validatePost() - CORE_1.2.0.7296-rc2/cake/libs/
> controller/components/security.php, line 525
> SecurityComponent::startup() - CORE_1.2.0.7296-rc2/cake/libs/
> controller/components/security.php, line 170
> Component::startup() - CORE_1.2.0.7296-rc2/cake/libs/controller/
> component.php, line 100
> Dispatcher::dispatch() - CORE_1.2.0.7296-rc2/cake/dispatcher.php, line
> 229
> [main] - ROOT/index.php, line 89
>
> I remove it and my form submits fine. Thanks!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to