Forums / Developer / Layout and Debug

Layout and Debug

Author Message

Jacques Feix

Wednesday 29 August 2007 2:16:06 am

Hi,
I have a very simple page layout for my ajax development :

<?xml version="1.0" encoding="iso-8859-1"?>
{$module_result.content}

But when the debug is activated, $module_result.content shows it and then my xml is not correct. How can I do to not show the debug even if it is activated ?

Regards,
Jacques

Pascal Specht

Wednesday 29 August 2007 2:26:11 am

Hi Jacques,

I've been running into a similar problem recently: If you look at the generated code, you'll notice that eZ Publish includes comments like <!-- START: including template: $path ($uri) --> into the generated code when using the 'list of used templates' debug option.

The problem is that when the template itself is a pagelayout (like in your case), this comment gets included BEFORE the Doctype header of your html code. And if you happen to use Internet Explorer, the parser gets wrong because of that comment.

To work around your problem:

either switch off the "list of used templates" option during debug,
or...
use a better browser

I hope this solves your problem. I filed a low priority bug on this: http://issues.ez.no/IssueView.php?Id=11317& although one can discuss for sure if it is legal or not to have HTML comments before the doctype statement. At least Firefox does accept it, and in general they are much closer to the standard than IE.

Pascal

Jacques Feix

Friday 31 August 2007 7:18:28 am

Thanks for your answer, but it doesn't help me ..
I don't want to take care of the debug (activated or not .. )

:)

Xavier Dutoit

Monday 03 September 2007 9:04:11 am

The main debug tables are enclosed where DEBUG_REPORT is defined

<CDATA..
<div id="debug_report">
<!--DEBUG_REPORT-->
</div>
...

should do the trick.

http://www.sydesy.com

Xavier Dutoit

Monday 03 September 2007 9:05:40 am

BTW, I'm developing a json extension, pure html (the template is too slow).

It should end up there pretty soon:

http://projects.ez.no/json

http://www.sydesy.com

Jacques Feix

Thursday 06 September 2007 1:19:39 am

Sorry, I don't understand what your advise me to do ...

Je crois que tu es francais, n'hesite pas à communiquer aussi ds cette langue ;)

I have done it,

<?xml version="1.0" encoding="iso-8859-1"?>
<my_xml>
   {$module_result.content}
   <cache_debug><![CDATA[ <!--DEBUG_REPORT-->]]></cache_debug>
</my_xml>

it almost works, but there is still some code like that :

<!-- START: including template: extension/mysitemap/design/standard/templates/ajax_layout.tpl (design:ajax_layout.tpl) -->