I'm writing a Magento Admin extension that has some ajax callbacks in it. Up until now I've been echoing the json I'm feeding back through the ajax call with a simple echo statement in the controller. It "works" but I get a bunch of errors like this in my log file:
2010-12-14T15:37:05+00:00 DEBUG (7): HEADERS ALREADY SENT:
[0] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:44 [1] /home/simplifiedsafety/www/store/lib/Zend/Controller/Response/Abstract.php:727 [2] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:75 [3] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Varien/Front.php:188 [4] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Model/App.php:304 [5] /home/simplifiedsafety/www/store/app/Mage.php:599 [6] /home/simplifiedsafety/www/store/index.php:104
I think to avoid this I need to push it out through some sort of block. Can someone give me a little guidance on this?