@franky091 I tried modifying the find method, but that didn't seem to make a difference either. I believe the manual says that I can do it the way I had it anyway. I'm just looking for one record anyway.
@AD7six The error I'm receiving is: Warning (2): Cannot modify header information - headers already sent by (output started at C:\wamp\www\intranet\cake\basics.php:262) [CORE \cake\libs\controller\controller.php, line 577] Code | Context $status = "Location: http://jthomas/contents" header - [internal], line ?? Controller::header() - CORE\cake\libs\controller\controller.php, line 577 Controller::redirect() - CORE\cake\libs\controller\controller.php, line 558 PostsController::step2() - APP\controllers\posts_controller.php, line 105 Object::dispatchMethod() - CORE\cake\libs\object.php, line 114 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 256 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 230 [main] - APP\webroot\index.php, line 90 The location is the page I'm trying to redirect to. I'm still looking into the issue. Surely something has to be causing it. On Jul 18, 2:11 am, AD7six <[EMAIL PROTECTED]> wrote: > On Jul 17, 6:01 pm, Stinkbug <[EMAIL PROTECTED]> wrote: > > > > > I tried removing the ?> from my files, but that didn't seem to help. > > I don't have a space at the end of ?> on any of my files anyway. This > > same exact code worked under cake 1.1, but it isn't in 1.2. > > > I also did some searching online and found an application called > > BabelPad that would save utf-8 files without BOM. I tried that. All > > of my files appeared to be saved without BOM, but I resaved them > > anyway, just in case. > > > Still didn't work. I've narrowed the problem down to one line of > > code. > > > $this->Post->Department->find("Department.id = " . $this->data['Post'] > > ['department_id'], array(), null, 1); > > > Then further down I have a redirect. The line above is a simple query > > to the database. I can comment this line out and the application > > redirects like it should. If I try to use this line, I get the header > > could not be sent error. > > > This model is associated with two other models. The User model and > > Post model. I'm unbinding the Post model so the only data being > > fetched is Department and user. In the find method above, if I set > > recursive to 0 the application redirects like it should (just grabbing > > the department data). Set to 1 it grabs the User data as well, but > > then I get the header can't be sent error. > > > I'm still trying to narrow the problem down. If anyone has any > > suggestions, I'd appreciate it though. > > Read the error message. if there is no error message enable debug. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
