Re: How do I redirect?

2012-03-21 Thread AD7six
On Tuesday, 20 March 2012 18:15:44 UTC+1, glevine wrote: In case anyone really cares, it was failing because the debugger was outputting warnings about changing the salt and cipherSeed configs. The point of my message was to highlight that's the case - and that the first reply you

Re: How do I redirect?

2012-03-20 Thread AD7six
On Tuesday, 20 March 2012 02:41:51 UTC+1, glevine wrote: @thatsgreat2345 That was just a typo. Commenting out the print statements in the change method has no effect. I never see the in the index print statement and the browser simply shows a blank page with a couple of warnings about

Re: How do I redirect?

2012-03-20 Thread pokerphp
Also never do any output from the controller. If you still want to make it nasty use something like public function index() {$nasty = 'in the index';$this-set('nasty', $nasty); } then in the View/Tests/index.ctp ?php print $nasty; ? this will be way better than printing

Re: How do I redirect?

2012-03-20 Thread euromark
i sure hope its not the same guy: http://stackoverflow.com/questions/9763280/cakephp-2-0-upgrade-shell-redirect-faulty same time, same crazy idea guys. if you want to crappy debug here, use DIE(); die('before redirect'); $this-redirect(array('controller' = 'test', 'action' = 'index'));

Re: How do I redirect?

2012-03-20 Thread glevine
AD7six, Initially, I had a print statement before the redirect left over from when I was tracing the code path down to the header() call. After commenting out all print statements except the one in index(), I still don't successfully redirect. That print statement shouldn't be called until

Re: How do I redirect?

2012-03-20 Thread glevine
Fair enough. My example was only to show that I was having trouble with reaching certain points in the code. I didn't want to write a lot of code for an example that didn't need to be overly complex to get the point across. On Tuesday, March 20, 2012 6:23:29 AM UTC-4, pokerphp wrote: Also

Re: How do I redirect?

2012-03-20 Thread glevine
euromark, No that stackoverflow post is not me. As I said previously, I'm not actually debugging with the code that I wrote above. I just posted an extremely rudimentary and flawed example to see if there was something outside of common sense that I was missing. The code I'm debugging doesn't

Re: How do I redirect?

2012-03-20 Thread glevine
In case anyone really cares, it was failing because the debugger was outputting warnings about changing the salt and cipherSeed configs. So that was the output that was being printed before the redirect which was giving me issues. Obviously I should have just taken care to do that sooner, but I

Re: How do I redirect?

2012-03-20 Thread euromark
and for more details on the subject see http://kb2.adobe.com/community/publishing/505/cpsid_50572.html Am Dienstag, 20. März 2012 18:15:44 UTC+1 schrieb glevine: In case anyone really cares, it was failing because the debugger was outputting warnings about changing the salt and cipherSeed

Re: How do I redirect?

2012-03-19 Thread thatsgreat2345
You can not send output to the webpage and then redirect. On Sunday, March 18, 2012 7:28:02 PM UTC-7, glevine wrote: I have the following code: class TestsController extends AppController { public function index() { print 'in the index'; } public function change() {

Re: How do I redirect?

2012-03-19 Thread Milina Udara
can we do some process after redirect.(Not printion) On Mon, Mar 19, 2012 at 11:37 AM, thatsgreat2345 thatsgreat2...@gmail.comwrote: You can not send output to the webpage and then redirect. On Sunday, March 18, 2012 7:28:02 PM UTC-7, glevine wrote: I have the following code: class

Re: How do I redirect?

2012-03-19 Thread euromark
no you can't! or: you really shoudn't you should simply do everything before redirecting. theoretically, you can manually call exit() if you set the exit param to false on redirect. but to me this makes no sense. can we do some process after redirect. -- Our newest site for the community:

Re: How do I redirect?

2012-03-19 Thread glevine
Right, so in the example I was mainly just wanting to show that I was reaching those points in the code. Theoretically, if I remove the print 'before redirect'; statement then I should never see after redirect but I should see in the index upon the new page load (since that is post redirect).

Re: How do I redirect?

2012-03-19 Thread Brian Bowler
Please do I have the exact same problem and would like to know if you get this fixed. On Mon, Mar 19, 2012 at 10:56 AM, glevine levine.g...@gmail.com wrote: Right, so in the example I was mainly just wanting to show that I was reaching those points in the code. Theoretically, if I remove the

Re: How do I redirect?

2012-03-19 Thread thatsgreat2345
Your problem is you are redirecting to test controller when in fact you should be redirecting to tests controller. $this-redirect(array('controller' = 'tests', 'action' = 'index')); On Monday, March 19, 2012 7:56:09 AM UTC-7, glevine wrote: Right, so in the example I was mainly just wanting

Re: How do I redirect?

2012-03-19 Thread glevine
@thatsgreat2345 That was just a typo. Commenting out the print statements in the change method has no effect. I never see the in the index print statement and the browser simply shows a blank page with a couple of warnings about changing the salt and cipherSeed. The url in the location bar

Re: How do I redirect?

2012-03-19 Thread thatsgreat2345
First off, change your core configuration so you aren't using the default salt and cipherSeed (this can be found in your apps core.php file in the Config folder), that is if this app matters which it seems like it is just a practice app but still good practice. It appears your routes(app Config

How do I redirect?

2012-03-18 Thread glevine
I have the following code: class TestsController extends AppController { public function index() { print 'in the index'; } public function change() { print 'before redirect'; $this-redirect(array('controller' = 'test', 'action' = 'index')); print 'after redirect';

Re: How do I redirect from an element

2008-06-17 Thread francky06l
If you want to render a new view when searching, you should not use ajax but normal submit, then the complete view will be rendered ... Maybe I misunderstood the problem. hth On Jun 17, 6:26 am, Shahzad [EMAIL PROTECTED] wrote: Thank you very much for you reply. Though I have solved the problem

Re: How do I redirect from an element

2008-06-17 Thread Shahzad
Thanks franky. I think this is the way to go. On Jun 17, 11:46 am, francky06l [EMAIL PROTECTED] wrote: If you want to render a new view when searching, you should not use ajax but normal submit, then the complete view will be rendered ... Maybe I misunderstood the problem. hth On Jun 17,

Re: How do I redirect from an element

2008-06-17 Thread Shahzad
Thanks franky. I think this is the way to go. On Jun 17, 11:46 am, francky06l [EMAIL PROTECTED] wrote: If you want to render a new view when searching, you should not use ajax but normal submit, then the complete view will be rendered ... Maybe I misunderstood the problem. hth On Jun 17,

How do I redirect from an element

2008-06-06 Thread Shahzad
I have an element search.ctp, it has a simple text box and a search button. When ever I press the search button and try to redirect (from my controller action), It displays the redirected page with in the element. What am I doing wrong? How do I redirect the whole page? Thank you

Re: How do I redirect from an element

2008-06-06 Thread b logica
and a search button. When ever I press the search button and try to redirect (from my controller action), It displays the redirected page with in the element. What am I doing wrong? How do I redirect the whole page? Thank you --~--~-~--~~~---~--~~ You received