my responseText from being sent, the action send back the entire page
with a flash message - request error. Imagine how funny it looks when
it gets loaded into a div. This is very hard to reproduce. It usually
happens once in a while.
This is my action in question --
/**
* This interacts with my formbuilding js - its the view that does
the trick here
*/
function buildform() {
if ($this->RequestHandler->isAjax()) {
configure::write('debug',0); //I am not a noob :)
[hopefully]
$this->layout = 'ajax'; //I tried this and the problem
occurs 1/20 atttempts
//$this->autoRender= false; //I did this first with no
view file and the problem occurs 1/10 times approx
$result = $this->{'_render'.$this->params['named']
['action']}($this->params['named']['type'] , isset($this-
>params['named']['id']) ? $this->params['named']['id'] : null);
$this->set('result',$result);
} else {
$this->Redirect->flashWarning('Request Error');
}
}
My buildform.ctp does an echo of $result which basically is a string
of html markup.
As you can see Ive already tried a number of things in order to
prevent the problem from recurring but am fresh out of ideas.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment