Submitted by : Simon Michael at: 2009-03-06T12:21:19-08:00 (8 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

(new) DTML does not work in edit previews --Simon Michael, Fri, 06 Mar 2009 12:21:21 -0800 reply

> I have another bug - this time in Preview mode where it isn't > previewing correctly because the temporary page object isn't copying > its attributes from its master page (e.g. "allow_dtml=1"). In > common.py:renderText(): > > # make a new page object, like in create > p = page.__class__(__name__=page.getId()) > p.title = page.pageName() > p = p.__of__(page.aq_parent) > p.setPageType(self.id()) > p.setText(text) > return p.render( > > Here it sets up the temporary page object and it doesn't copy over > attributes. Therefore, previewing a page with DTML enabled just for > that page doesn't work. > > Fraid I have no idea how to copy across attributes in Zope. > p.setattr('allow_dtml', page.getattr('allow_dtml',0)) is fairly > obvious but I couldn't figure out how to iterate all attributes.

... --simon, Wed, 28 Oct 2009 11:27:30 -0700 reply

Name: '#1445 DTML does not work in edit previews' => '#1445 DTML can get disabled in edit previews' Category: => user-editing Status: => open

clarification --simon, Wed, 28 Oct 2009 17:43:14 -0700 reply

Name: '#1445 DTML can get disabled in edit previews' => '#1445 previews do not always work exactly like the final page'

As noted, various properties are not mimicked during preview, so eg things like DTML or subtopics might be disabled or enabled during preview.