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) -->

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:16:32
Script start
Timing: Jan 31 2025 01:16:32
Module start 'layout'
Timing: Jan 31 2025 01:16:32
Module start 'content'
Timing: Jan 31 2025 01:16:33
Module end 'content'
Timing: Jan 31 2025 01:16:33
Script end

Main resources:

Total runtime1.3635 sec
Peak memory usage8,192.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.0156151.1953
Module start 'layout' 0.00590.0038 739.2109220.6563
Module start 'content' 0.00961.3531 959.86724,518.8516
Module end 'content' 1.36280.0007 5,478.718815.8750
Script end 1.3635  5,494.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2554160.0002
Check MTime0.00130.0962160.0001
Mysql Total
Database connection0.00080.055110.0008
Mysqli_queries1.259092.3342680.0185
Looping result0.00090.0646660.0000
Template Total1.306095.820.6530
Template load0.00220.162520.0011
Template processing1.303895.617420.6519
Template load and register function0.00160.120810.0016
states
state_id_array0.00200.144810.0020
state_identifier_array0.00140.103320.0007
Override
Cache load0.00200.1439450.0000
Sytem overhead
Fetch class attribute can translate value0.00220.163930.0007
Fetch class attribute name0.00220.159980.0003
XML
Image XML parsing0.00220.162530.0007
class_abstraction
Instantiating content class attribute0.00000.001590.0000
General
dbfile0.00540.3982220.0002
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs