Hi Markus,
Did you ever find a solution to this?
I have had the same problem with my JSON output, and added some
customisations to my files to get around the debug code popping up in
AJAX files .
1. In controller methods that use AJAX I define a constant
DISABLE_TIMERWATCH to true.
2. In my site's index.php I changed it so the timer at the bottom of
the output only displays if the constant is undefined. (For when you
have DEBUG=1)
3. In cake/libs/model/datasources/dbo_source.php file I similarly
disble the debug output in the close() method, only calling showlog if
I haven't set that constant.
It's a hack, but it works. The only problem is the need to edit the
file in the cake dir, which I know isn't recommended.
Can anyone suggest a better way?
-ad
[EMAIL PROTECTED] wrote:
> Hi list,
>
> I'm using cakePHP version 1.1.7. I'm delivering XML to the browser via
> XMLHttpRequest. The controller method looks like this:
>
> $this->RequestHandler->setAjax($this);
> header("Content-Type: text/xml");
> $this->set('summary',
> $this->SiteSummary->summarize($this->data['Bookmark']['url']));
> $this->render();
>
> I have DEBUG set to 2. This appends a HTML table to the output which
> renders the XML invalid, and indeed responseXML is empty.
>
> I don't want to set DEBUG to 1 because the output is useful on normal
> pages.
>
> Does cakePHP provide for such a scenario?
>
> Thanks
>
> Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---