comanage-dev - [comanage-dev] Re: [JIRA] (CO-234) CoNsfDemographics needs validate for REST
Subject: COmanage Developers List
List archive
- From: Marie Huynh <>
- To: Benn Oshrin <>, comanage-dev <>
- Subject: [comanage-dev] Re: [JIRA] (CO-234) CoNsfDemographics needs validate for REST
- Date: Fri, 2 Mar 2012 17:05:09 -0800
- Authentication-results: mr.google.com; spf=pass (google.com: domain of designates 10.68.129.104 as permitted sender) ; dkim=pass
I'm squishing those bugs but that was from an edit, which did return this:
* About to connect() to localhost port 80 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'test'
> POST /gears/trunk/co_nsf_demographics.json HTTP/1.1
> Authorization: Basic dGVzdDphc2Rm
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
> Host: localhost
> Accept: */*
> Content-Type: application/json
> Content-Length: 30
>
< HTTP/1.1 200 OK
< Date: Sat, 03 Mar 2012 00:36:34 GMT
< Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
< X-Powered-By: PHP/5.3.6
< Set-Cookie: CAKEPHP=2461d00ff12e4ad863f2783d8906f2d5; expires=Sat, 03-Mar-2012 04:36:34 GMT; path=/
< P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
< Content-Length: 208
< Content-Type: application/json; charset=UTF-8
<
{"ResponseType":"CoNsfDemographics","Version":"1.0","CoNsfDemographics":[{"Version":"1.0","Id":"1","Person":{"Type":"Co","Id":"1"},"Gender":"M","Citizenship":"US","Ethnicity":"H","Race":"","Disability":""}]}
* Connection #0 to host localhost left intact
HTTP STATUS: 200
TIME: 0.118
* Closing connection #0
On Fri, Mar 2, 2012 at 4:37 PM, Benn Oshrin <> wrote:
No, those are new errors :)
My problem will generate a proper REST reply.Marie Huynh <> wrote:Is this what you're expecting?2012-03-02 15:54:48 Notice: Notice (8): Undefined index: status in [/Applications/MAMP/htdocs/gears/trunk/app/Controller/AppController.php, line 679]Trace:AppController::convertResponse() - APP/Controller/AppController.php, line 679StandardController::index() - APP/Controller/StandardController.php, line 575ReflectionMethod::invokeArgs() - [internal], line ??Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 473Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 104Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 86[main] - APP/webroot/index.php, line 962012-03-02 15:54:48 Notice: Notice (8): Undefined index: race in [/Applications/MAMP/htdocs/gears/trunk/app/Model/CoNsfDemographic.php, line 83]Trace:CoNsfDemographic::extractOptions() - APP/Model/CoNsfDemographic.php, line 83CoNsfDemographicsController::beforeRender() - APP/Controller/CoNsfDemographicsController.php, line 69Controller::render() - CORE/Cake/Controller/Controller.php, line 865Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 111Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 86[main] - APP/webroot/index.php, line 962012-03-02 15:54:48 Notice: Notice (8): Undefined index: in [/Applications/MAMP/htdocs/gears/trunk/app/Model/CoNsfDemographic.php, line 89]Trace:CoNsfDemographic::extractOptions() - APP/Model/CoNsfDemographic.php, line 89CoNsfDemographicsController::beforeRender() - APP/Controller/CoNsfDemographicsController.php, line 69Controller::render() - CORE/Cake/Controller/Controller.php, line 865Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 111Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 86[main] - APP/webroot/index.php, line 962012-03-02 15:54:48 Notice: Notice (8): Undefined index: disability in [/Applications/MAMP/htdocs/gears/trunk/app/Model/CoNsfDemographic.php, line 98]Trace:CoNsfDemographic::extractOptions() - APP/Model/CoNsfDemographic.php, line 98CoNsfDemographicsController::beforeRender() - APP/Controller/CoNsfDemographicsController.php, line 69Controller::render() - CORE/Cake/Controller/Controller.php, line 865Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 111Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 86[main] - APP/webroot/index.php, line 962012-03-02 15:54:48 Notice: Notice (8): Undefined index: in [/Applications/MAMP/htdocs/gears/trunk/app/Model/CoNsfDemographic.php, line 104]Trace:CoNsfDemographic::extractOptions() - APP/Model/CoNsfDemographic.php, line 104CoNsfDemographicsController::beforeRender() - APP/Controller/CoNsfDemographicsController.php, line 69Controller::render() - CORE/Cake/Controller/Controller.php, line 865Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 111Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 86[main] - APP/webroot/index.php, line 96On Fri, Mar 2, 2012 at 10:14 AM, Benn Oshrin (JIRA) <> wrote:
[ https://bugs.internet2.edu/jira/browse/CO-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16560#comment-16560 ]
Benn Oshrin commented on CO-234:
--------------------------------
Specifically, this test in AppController will fail:
if(!isset($this->$req->validate[Inflector::underscore($k)])) {
$bad[$k] = "Unknown Field";
}> -----------------------------------------
> CoNsfDemographics needs validate for REST
>> Labels: sprint04
> Key: CO-234
> URL: https://bugs.internet2.edu/jira/browse/CO-234
> Project: COmanage
> Issue Type: Bug
> Components: Registry
> Affects Versions: COmanage Registry 0.4 (Reshaped Cake)
> Reporter: Benn Oshrin
> Assignee: Marie Huynh
> Fix For: COmanage Registry 0.4 (Reshaped Cake)
>
>
> CoNsfDemographics model needs $validate to be populated with all attributes or REST calls will fail with "Unknown Attribute".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://bugs.internet2.edu/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
- [comanage-dev] Re: [JIRA] (CO-234) CoNsfDemographics needs validate for REST, Marie Huynh, 03/02/2012
Archive powered by MHonArc 2.6.16.