.pt Compile Errors Masked in Skins

Bug #98254 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
Zope 3
Status tracked in 3.4
Nominated for 3.3 by Gerry C.
3.4
Fix Released
Critical
Unassigned
zope.pagetemplate
Won't Fix
Undecided
Unassigned

Bug Description

If a skin under development has a syntax error, attempts to display a page that uses the skin will get a misleading KeyError, where the referenced macro name is not found (although the thrown exception does show the name of what wasn't found). But the log output shows no syntax errors, so you don't know what to look for.

Then, if you instead try to display the skin itself (URL @@standard_pages/mymacro), you DO see the syntax error, with line number, as follows:

TypeError: unsubscriptable object
------
2005-12-03T12:19:36 ERROR root PageTemplateFile: Error in template: Compilation failed
HTMLParser.HTMLParseError: EOF in middle of construct, at line 10, column 3
------
2005-12-03T12:19:36 ERROR root PageTemplateFile: Error in template: Compilation failed
HTMLParser.HTMLParseError: EOF in middle of construct, at line 10, column 3

The problem is that something is catching and eating the thrown exception in the first case, making it hard to debug a template syntax error that masquerades as a logic error. Anytime there is a template compile error, it should be logged.

Revision history for this message
Christian Theune (ctheune) wrote :

This might be two problems. One of them was solved recently when
I added the filename of the template which is broken to the error
message. This might then do what you need.

Revision history for this message
Jim Fulton (jim-zope) wrote :

Changes: edited transcript, importance (medium => critical), new comment

We need to verify if this was fixed.

Changed in zope3:
status: Unconfirmed → Confirmed
Revision history for this message
Dmitry Vasiliev (hdima) wrote :

I've just tried to reproduce error but all works as expected so I think it was fixed.

Revision history for this message
Benji York (benji) wrote : Re: [Bug 98254] Re: .pt Compile Errors Masked in Skins

Dmitry Vasiliev wrote:
> I've just tried to reproduce error but all works as expected so I think
> it was fixed.

It would be nice to verify that a test was added as well, so the bug
doesn't come back.
--
Benji York
Senior Software Engineer
Zope Corporation

Revision history for this message
Tres Seaver (tseaver) wrote :

This bug was handled in the Zope3 3.4 release cycle.

Changed in zope.pagetemplate:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.