Submitted by : simon at: 2003-10-26T21:32:14+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Excerpts from the GD thread beginning at http://zwiki.org/GeneralDiscussion#msg20030725010630GMT@zwiki.org :

Unrequested change of page type --JohnDeBruyn, 2003/07/25 01:06 GMT reply

Hi Simon: I have been running a Zwiki since November and this just turned up for the first time when I edited a page:

Warning: this page's current type (HTML + DTML) is not one of the allowed types for this wiki. Saving this page will change it's type and probably break it.

Looks like the page did break as it does not publish when called as it did before. I don't have selection of page type implemented and wonder how this crept into place. Thanks, John

Unrequested change of page type --SimonMichael, 2003/07/25 16:21 GMT reply

Hi John!

This is to do with the allowed_page_types restriction introduced in a recent release (0.20 I think). This is intended to prevent unknowing DTML use, but I'm not sure it's the right approach. The quickest way to make that page work again is to go to it's ZMI Properties tab and change the page_type field back to 'dtmlhtml' (and don't edit again).

If you want to be able to edit DTML-enabled pages freely, you would need to make a folder lines property called 'allowed_page_types' containing, in your case just: 'msgstxprelinkdtmlfitissuehtml'.

Does this help ?

John wrote <br> No, seems I need more help, see (this page)

I copied the property label and property element without the single quotes and pasted them into the appropriate little windows to crate the allowed_page_types property with msgstxprelinkdtmlfitissuehtml and voi la this comes up in lieu of the edit form when I try to edit a page:

This wiki's editform template gave an error.
Traceback (most recent call last):
 File "/usr/local/zope/shared1/Products/ZWiki/UI.py", line 259, in editform
   oldid=self.id())
 File "/usr/local/zope/261/lib/python/Shared/DC/Scripts/Bindings.py", line 252, in __call__
   return self._bindAndExec(args, kw, None)
 File "/usr/local/zope/261/lib/python/Shared/DC/Scripts/Bindings.py", line 283, in _bindAndExec
   return self._exec(bound_data, args, kw)
 File "/usr/local/zope/261/lib/python/Products/PageTemplates/PageTemplateFile.py", line 96, in _exec
   return self.pt_render(extra_context=bound_names)
 File "/usr/local/zope/261/lib/python/Products/PageTemplates/PageTemplate.py", line 95, in pt_render
   tal=not source, strictinsert=0)()
 File "/usr/local/zope/261/lib/python/TAL/TALInterpreter.py", line 200, in __call__
   self.interpret(self.program)
 File "/usr/local/zope/261/lib/python/TAL/TALInterpreter.py", line 244, in interpret
   handlers[opcode](self, args)
 File "/usr/local/zope/261/lib/python/TAL/TALInterpreter.py", line 668, in do_condition
   if not self.tal or self.engine.evaluateBoolean(condition):
 File "/usr/local/zope/261/lib/python/Products/PageTemplates/TALES.py", line 217, in evaluate
   return expression(self)
 File "/usr/local/zope/261/lib/python/Products/PageTemplates/ZRPythonExpr.py", line 48, in __call__
   return eval(code, g, {})
 File "Python expression "here.page_type not in allowed_types"", line 2, in f

which may suggest what's up at Zetta.Net with Zwiki, Thanks, JohnDeBruyn (July 26, 2003)

property type --SimonMichael, 2003/07/29 01:38 GMT reply

Thanks for posting the traceback, it helped. I found one more useful line at http://manage.audans.com/test/FrontPage/editform

TypeError: 'in ' requires character as left operand

It looks as if you have a "string" property - this should be a "lines" property. Just delete it and make again.

property change --SimonMichael, 2003/07/29 01:38 GMT reply

Category: => general Status: => pending

... --JohnDeBruyn, 2003/07/29 02:36 GMT reply

Thanks Simon, I deleted and reentered the property as suggested and then changed "string" to "lines" with the result that the error does not occur. However, this instance of wiki that was created after wiki 2.0 was installed will not render structured text and the following comes up above the edit window when the full-page editor is invoked:

Warning: this page's current type (stxprelinkhtml) is not one of the allowed types for this wiki. Saving this page will change it's type and probably break it.

Thanks, for your help in working this through. John

new wikis initialized with old page types --SimonMichael, 2003/07/29 03:04 GMT reply

Likewise..

> occur. However, this instance of wiki that was created after wiki 2.0 > was installed

after Zwiki 0.20, right..

I see. You can go ahead and edit those pages and they will be converted to an allowed page type, after which you won't see the warning. (In this case viewing the page once might also do the trick). But as you point out, new wikis are having their pages initialized with the old types, incorrectly. Good catch, I'll release rc3 to fix this one.

... --JohnDeBruyn, 2003/07/29 03:18 GMT reply

Hi Simon: As you suggested I used "msgstxprelinkdtmlfitissuehtml" as the allowed property and the warning came up. I then changed the property to "stxprelinkhtml" which was the page type that the warning said it could not allow and would break the page or however that went as set out just above. As before however, structured text will still not be rendered as wikis were meant to do. This is more or less what I just reported overe at the other page. Thanks for your help, John

are we there ? --SimonMichael, 2003/07/29 17:38 GMT reply

John, I believe with rc3 and your property fix these issues have been resolved. If not, please advise.

property change --SimonMichael, Tue, 19 Aug 2003 19:27:38 +0000 reply

Status: pending => closed

Version not clear in the comments --AndrewDalgleish?, Sun, 24 Aug 2003 05:49:43 +0000 reply

Which version do you mean by "rc3"?

Version not clear in the comments --SimonMichael, Sun, 24 Aug 2003 18:06:58 +0000 reply

0.21.0-rc3, now 0.21.1.