comanage-dev - Re: [comanage-dev] r387 - registry/trunk/app/Controller
Subject: COmanage Developers List
List archive
- From: Marie Huynh <>
- To: Scott Koranda <>
- Cc: Benn Oshrin <>,
- Subject: Re: [comanage-dev] r387 - registry/trunk/app/Controller
- Date: Mon, 22 Oct 2012 16:27:41 -0700
I've not been able to reproduce this either. I suspect my system is simply treating undefined variables as null and Scott's isn't. I dumped out $email_addresses on the add page and there's nothing there. On edit, I see this:
Array ( [0] => Array ( [EmailAddress] => Array ( [id] => 1 [mail] => [type] => O [co_person_id] => [org_identity_id] => 2 [created] => 2012-10-22 17:42:14 [modified] => 2012-10-22 17:42:14 ) etc.
Marie
On Mon, Oct 22, 2012 at 3:27 PM, Scott Koranda <> wrote:
Hi,
Thanks. I did a rebase and that worked.
> This ended up being pretty easy.
>
> performRedirect() is a StandardController function that tries to
> figure out what redirect to issue after an operation completes.
> Marie recently modified it to add support for passing a tab to
> select on CoPerson or OrgIdentity views, for Models that
> requires_person.
>
> Basically, the check for the redirect variable should have been done
> within the requires_person check, but instead that check was
> happening later. As such, when a Controller that did not
> requires_person triggered a StandardController::performRedirect,
> viewVars['redirect'] wouldn't have been set.
>
> You can see the details in the diff.
I am now, however, getting another error when I try to add an
email for an org person:
Notice (8): Undefined variable: email_addresses
[APP/View/EmailAddresses/fields.inc, line 99]
Code Context
</td>
<td>
<?php print
($email_addresses[0]['EmailAddress']['verified'] ?
_txt('fd.yes') : _txt('fd.no')); ?>
include - APP/View/EmailAddresses/fields.inc, line 99
include - APP/View/Standard/add.ctp, line 67
View::_render() - CORE/Cake/View/View.php, line 595
View::render() - CORE/Cake/View/View.php, line 362
Controller::render() - CORE/Cake/Controller/Controller.php,
line 900
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line
111
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php,
line 86
[main] - APP/webroot/index.php, line 96
Any takers?
Thanks,
Scott
>
> -Benn-
>
> On 10/22/12 2:58 PM, wrote:
> >Author: benno
> >Date: 2012-10-22 14:58:05 -0400 (Mon, 22 Oct 2012)
> >New Revision: 387
> >
> >Modified:
> > registry/trunk/app/Controller/StandardController.php
> >Log:
> >Fix redirect expectations (CO-493)
> >
> >Modified: registry/trunk/app/Controller/StandardController.php
> >===================================================================
> >--- registry/trunk/app/Controller/StandardController.php 2012-10-16 19:16:11 UTC (rev 386)
> >+++ registry/trunk/app/Controller/StandardController.php 2012-10-22 18:58:05 UTC (rev 387)
> >@@ -682,24 +682,23 @@
> > */
> >
> > function performRedirect() {
> >- $redirect = $this->viewVars['redirect'];
> >-
> >- // Sets tab to be opened by co_people page via jquery
> >- if($this->viewVars['redirect']['controller'] == 'co_people'
> >- || $this->viewVars['redirect']['controller'] == 'org_identities') {
> >- if($this->redirectTab)
> >- $redirect['tab'] = $this->redirectTab;
> >- }
> >-
> > if($this->requires_person) {
> >+ $redirect = $this->viewVars['redirect'];
> >+
> >+ // Sets tab to be opened by co_people page via jquery
> >+ if($this->viewVars['redirect']['controller'] == 'co_people'
> >+ || $this->viewVars['redirect']['controller'] == 'org_identities') {
> >+ if($this->redirectTab)
> >+ $redirect['tab'] = $this->redirectTab;
> >+ }
> >+
> > $this->set('redirect', $redirect);
> > $this->redirect($redirect);
> >- }
> >-
> >- if(isset($this->cur_co))
> >+ } elseif(isset($this->cur_co)) {
> > $this->redirect(array('action' => 'index', 'co' => Sanitize::html($this->cur_co['Co']['id'])));
> >- else
> >+ } else {
> > $this->redirect(array('action' => 'index'));
> >+ }
> > }
> >
> > /**
> >
>
- [comanage-dev] r387 - registry/trunk/app/Controller, svnlog, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Benn Oshrin, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Scott Koranda, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Marie Huynh, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller (CO-494), Benn Oshrin, 10/23/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller (CO-494), Marie Huynh, 10/23/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller (CO-494), Benn Oshrin, 10/23/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Marie Huynh, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Scott Koranda, 10/22/2012
- Re: [comanage-dev] r387 - registry/trunk/app/Controller, Benn Oshrin, 10/22/2012
Archive powered by MHonArc 2.6.16.