ViewPageTemplate File renders improper

Bug #592708 reported by Andreas Jung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.pagetemplate
Invalid
Low
Unassigned

Bug Description

We have a Zope 2.10 based app where

from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile

is used to render a template containing
    <body>

       <div tal:condition="options/coverfront | nothing"
             tal:content="structure options/coverfront"
             id="cover-front"/>

       <div id="table-of-contents">
            <h1 i18n:translate="label_table_of_contents">Table of contents</h1>
            <div id="toc" />
        </div>

        <div id="main-content">
            <div tal:replace="structure options/body" />
        </div>

        <div tal:condition="options/coverback | nothing"
             tal:content="structure options/coverback"
             id="cover-back"
        />
    </body>

This is rendered as

<body>
<div id="table-of-contents">
<h1>label_table_of_contents</h1>
<div id="toc"></div>
<div id="main-content">
....

So the closing </div> of #table-of-contents is missing.

Replacing

  <div id="toc" />

with

<div id="toc"></div>

works.

Tags: zpt
Revision history for this message
Hanno Schlichting (hannosch) wrote :

The ViewPageTemplateFile from zope.app.pagetemplate lives in zope.pagetemplate today. Zope2 doesn't support zope.app.pagetemplate but has its own version in Products.Five.

affects: zope2 → zope.pagetemplate
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope.pagetemplate project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope.pagetemplate.

Changed in zope.pagetemplate:
status: New → Invalid
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.