Forums / Developer / Error reporting

Error reporting

Author Message

Marc Boon

Wednesday 15 February 2006 8:46:47 am

Is there a way to show template file and line number with errors?
Without it debugging template code is quite cumbersome...

Samuel Sauder

Friday 17 February 2006 3:48:48 am

Are your debug settings turned on? For example when I changed a <i>let</i> to <i>slet</i> (typo), I get this output (in error.log and in browser) which tells me the line number (213) and character position (0)

Error: eZTemplate @ design/blog/override/templates/full/folder_profile.tpl:213[0]  	

parser error @ design/blog/override/templates/full/folder_profile.tpl:213[0]
Unterminated tag "slet" does not match tag "let"

Warning: eZTemplate 	

Function "slet" is not registered

Marc Boon

Sunday 19 February 2006 5:28:54 am

In var/log/error.log I get messages like this:

[ Feb 18 2006 20:58:40 ] [127.0.0.2] Missing/malformed array to iterate through.
[ Feb 18 2006 21:14:54 ] [127.0.0.2] No such attribute for array(5): short_title
Choose one of following: name, short_name, short_description, description,
show_children

But they don't even show the name of the template file, let alone line number.

eZ debug

Timing: Jan 20 2025 21:02:49
Script start
Timing: Jan 20 2025 21:02:49
Module start 'content'
Timing: Jan 20 2025 21:02:49
Module end 'content'
Timing: Jan 20 2025 21:02:49
Script end

Main resources:

Total runtime0.0284 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 587.5859180.8516
Module start 'content' 0.00830.0075 768.437593.8359
Module end 'content' 0.01580.0125 862.273470.7031
Script end 0.0283  932.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00279.3958120.0002
Check MTime0.00134.4480120.0001
Mysql Total
Database connection0.00072.417210.0007
Mysqli_queries0.003913.779140.0010
Looping result0.00000.158820.0000
Template Total0.012042.310.0120
Template load0.00103.417910.0010
Template processing0.011038.862910.0110
Override
Cache load0.00072.392910.0007
General
dbfile0.007927.8858100.0008
String conversion0.00000.037830.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs