Forums / Developer / Help me with debug output.

Help me with debug output.

Author Message

Daniele Nocentini

Tuesday 21 July 2009 3:37:24 am

I'm a problem with my extension, I write a ajax tabs (jquery) and the contents of tabs link it's loaded via ajax in a div but when I enabling the ezdebug this is also included inside the div.
How can I disabling ezdebug via php code?

thanks.

Antica Bottega Digitale srl
http://www.abd.it

Max Keil

Tuesday 21 July 2009 4:53:55 pm

Hi Daniele,

eZExecution::cleanExit();

at the end of your script prevent eZ Publish to load the pagelayout and the debug.

Mit freundlichen Grüßen
Best regards

Max Keil

____________________________________________________________
eZ Publish Gold Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Daniele Nocentini

Wednesday 22 July 2009 12:41:23 am

Hi Max,

to exclude pagelayout.tpl I have used this code:

$Result = array();
$Result['pagelayout'] = false;

with your code I have no output.

Antica Bottega Digitale srl
http://www.abd.it

Josh Bair

Monday 27 July 2009 10:41:07 am

We've had this problem as well and are open to learning the best practices.

The eZ Flow timeline handles this on the JavaScript side. There's a lot of postprocessing in timeline.js but here is an example where they strip out HTML comments:

// Remove any html comments that might exists in the js. It seems to upset firefox.
script = script.gsub( "<!--", "" );
script = script.gsub( "//-->", "" );
script = script.gsub( "-->", "" );

André R.

Tuesday 28 July 2009 1:04:44 am

You need to echo your ouput yourself when you use "eZExecution::cleanExit();".

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Gaetano Giunta

Tuesday 28 July 2009 1:48:33 am

Another option to 'hide' the debug output from some pages even when this is added by eZP (ie. debug mode on) is to simply put it in a comment.

At the bottom of the pagelayout put:

For xml/html:

<!-- <!--DEBUG_REPORT--> -->

For js/json/ajax content:

/* <!--DEBUG_REPORT--> */

Note: the debug report always prints html, not xml, so it it might break your xml because of invalid entities.

Principal Consultant International Business
Member of the Community Project Board