@Geore, I have tried taking it out and what happens is that it goes to the
'/formulas/instructions/' page minus the ID variables. I assume this
happens because this is happening because of POST. I either want to
redirect to a different page such as 'formulas/manage' (for example) or
redirect to '/formulas/instructions/78' (for example) so that the users
aren't confused. However what happens is that it gets redirected to a blank
page and when I view the page's source it also comes up blank. If I through
a debug in there it shows up with a blank page with the output of a debug
on it.

@Romel and @Vijay, same thing happens it just comes up completely blank.


On Sun, Mar 11, 2012 at 12:01 AM, romel javier gomez herrera <
[email protected]> wrote:

> try with this  $this->redirect($this->referer());
>
>
> El 10 de marzo de 2012 21:24, Brian Bowler <[email protected]> escribió:
>
>> So I have this function where the user can add the weight to materials
>> and save them. However after the updateAll, $this->redirect doesn't work at
>> all and the result shows up with a blank page with nothing in the source.
>> In an ideal world I would have it redirect to a different page but at a
>> minimum I would like it to go back to the page where they entered in the
>> weights.
>>
>>   public function instructions($id = null) {
>>         $instructions = $this->Formula->findFormula($id);
>>         $count = count($instructions);
>>         $this->set(array('instructions' => $instructions, 'count' =>
>> $count, 'formulaId' => $id));
>>         if(!empty($this->data)) {
>>             $count = count($this->request->data);
>>             for($i = 0; $i <= $count; $i++) {
>>                 $this->Formula->updateAll(
>>                     array('Formula.weight' =>
>> $this->request->data['Formula'][$i]['weight']),
>>                     array('Formula.id' =>
>> $this->request->data['Formula'][$i]['id'])
>>                 );
>>             }
>>         }
>>         $this->redirect(array('controller' => 'instructions', 'action' =>
>> 'instructions', $id));
>>     }
>>
>> I have no idea what causes this. Any help is much appreciated, even if
>> its just telling me where in the manual to read up on it.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to