Submitted by : JordanC at: 2007-08-24T18:21:19-07:00 (10 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

I'm getting the following error trying to view Zwiki pages in Plone. When I create a Zwiki folder inside Plone I don't have the problem. Zwiki 0.59.0 and Plone 2.5.2.

Traceback (innermost last):

 Module ZPublisher.Publish, line 115, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 41, in call_object
 Module Products.ZWiki.Views, line 470, in editform
 Module Shared.DC.Scripts.Bindings, line 311, in __call__
 Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
 Module Products.CMFCore.FSPageTemplate, line 195, in _exec
 Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
 Module Products.PageTemplates.PageTemplate, line 104, in pt_render
  - <FSPageTemplate at /Plone/editform used for /Plone/members/michael.ronan/engl1302_wiki/wiki_page.2007-08-24.2719383186>
 Module TAL.TALInterpreter, line 238, in __call__
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 749, in do_useMacro
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 457, in do_optTag_tal
 Module TAL.TALInterpreter, line 442, in do_optTag
 Module TAL.TALInterpreter, line 437, in no_tag
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 749, in do_useMacro
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 772, in do_defineSlot
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 457, in do_optTag_tal
 Module TAL.TALInterpreter, line 442, in do_optTag
 Module TAL.TALInterpreter, line 437, in no_tag
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 772, in do_defineSlot
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 457, in do_optTag_tal
 Module TAL.TALInterpreter, line 442, in do_optTag
 Module TAL.TALInterpreter, line 437, in no_tag
 Module TAL.TALInterpreter, line 281, in interpret
 Module TAL.TALInterpreter, line 735, in do_useMacro
 Module Products.PageTemplates.TALES, line 221, in evaluate
  - URL: file:ZWiki/skins/zwiki/editform.pt
  - Line 6, Column 6
  - Expression: standard:'here/macros/formsearchtags'
  - Names:
     {'container': <PloneSite at /Plone>,
      'context': <ZWikiPage 'wiki_page.2007-08-24.2719383186' at 0x691ca30>,
      'default': <Products.PageTemplates.TALES.Default instance at 0x01551328>,
      'here': <ZWikiPage 'wiki_page.2007-08-24.2719383186' at 0x691ca30>,
      'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x06D480A8>,
      'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x0153E8A0>,
      'nothing': None,
      'options': {'action': 'Change',
                  'args': (<ZWikiPage 'wiki_page.2007-08-24.2719383186' at 0x691ca30>,
                           <HTTPRequest, URL=http://198.64.45.77/members/michael.ronan/engl1302_wiki/wiki_page.2007-08-24.2719383186/editform>),
                  'id': 'wiki_page.2007-08-24.2719383186',
                  'oldid': 'wiki_page.2007-08-24.2719383186',
                  'page': 'wiki_page.2007-08-24.2719383186',
                  'text': ''},
      'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x06D480A8>,
      'request': <HTTPRequest, URL=http://198.64.45.77/members/michael.ronan/engl1302_wiki/wiki_page.2007-08-24.2719383186/editform>,
      'root': <Application at >,
      'template': <FSPageTemplate at /Plone/editform used for /Plone/members/michael.ronan/engl1302_wiki/wiki_page.2007-08-24.2719383186>,
      'traverse_subpath': [],
      'user': <PropertiedUser 'admin'>}
 Module Products.PageTemplates.Expressions, line 185, in __call__
 Module Products.PageTemplates.Expressions, line 173, in _eval
 Module Products.PageTemplates.Expressions, line 127, in _eval
  - __traceback_info__: here
 Module Products.PageTemplates.Expressions, line 286, in restrictedTraverse
  - __traceback_info__: {'path': ['macros', 'formsearchtags'], 'TraversalRequestNameStack': ['formsearchtags']}
 Module Products.Five.traversable, line 82, in __bobo_traverse__
 Module Products.ZWiki.Views, line 277, in getmacros
AttributeError: pt_macros

more info --simon, Fri, 31 Aug 2007 01:07:25 -0700 reply

Hi Jordan, thanks for the report. I didn't understand the difference between your failing and working cases, can you give a bit more detail ? Does the error affect all pages in the wiki ? Do you have any old custom templates that could be the cause ?

re:more info --JordanC?, Sat, 01 Sep 2007 23:21:11 -0700 reply

It's really odd. I can create a ZWiki page and copy it into any three member folders randomly. Inside some folders it will display normally and in others I get this error message. There's got to be an obvious reason for this but I think I've been staring too long to see it ;)

bad template ? --simon, Wed, 05 Sep 2007 20:39:09 -0700 reply

It's this line, isn't it:

MACROS.update(self.getSkinTemplate(t).pt_macros())

I'm a bit confused because it says:

- URL: file:ZWiki/skins/zwiki/editform.pt

but later:

'template': <FSPageTemplate at /Plone/editform used for /Plone/members/michael.ronan/engl1302_wiki/wiki_page.2007-08-24.2719383186>,

Do you have a FS page template called editform in the site root folder ? That seems unusual, but should work. getSkinTemplate should return it, because isPageTemplate should recognise its meta type. You could set a breakpoint there, run zopectl fg and see what getSkinTemplate is returning.

bad template ? --simon, Wed, 05 Sep 2007 20:40:18 -0700 reply

And by the way, isn't this traceback from viewing the edit form ? But I think you said viewing the page ?

bad template ? --JordanC?, Wed, 05 Sep 2007 23:47:57 -0700 reply

Well, it just kind of gets weirder. I deleted one of the member folders that was throwing the error. Then I created a new member folder and added a new wiki page and it worked?!? So the issue seems to be related to some setting in Plone and not ZWiki I'm guessing. Could it be related to caching or proxying Zope?

I'm getting the error when trying to view and/or edit. Here's the same error for wikipage.pt, http://paste.plone.org/16689.

When I go to "<mysite>/wikipage/manage_main" the source file is returned as "ZWiki/skins/zwiki/wikipage.pt" which is correct I think. I don't know if there is more info I can get from running zopectl fg and !getSkinTemplate.

bad template ? --jordanc, Thu, 06 Sep 2007 00:02:09 -0700 reply

Once I make any changes to the wiki page I start getting the same errors again(?)

bad template ? --simon, Thu, 06 Sep 2007 10:28:11 -0700 reply

How are your skills with a pdb.set_trace() prompt ? Could you come on #zwiki to debug it ? The Clouseau tool is another option.

bad template ? --jordanc, Thu, 06 Sep 2007 15:25:21 -0700 reply

Unfortunately, I'm not familiar with pdb or debugging in general. Next week I'll set up a test environment and see how far I can get with pdb or Clouseau.

non-release blocker --simon, Sat, 15 Sep 2007 10:42:50 -0700 reply

For now this looks like a local issue we should debug.. I won't hold the release for it.

non-release blocker --jordanc, Sat, 15 Sep 2007 10:48:04 -0700 reply

Absolutely. I have not had a chance to get back to it this past week, but it is an important issue for us and once I have more information I will let you know what we find.

non-release blocker --Simon Michael, Sat, 15 Sep 2007 10:55:02 -0700 reply

Thanks Jordan.. if it wasn't clear, do chat me on #zwiki (later) if I can help in real time.

... --betabug, Mon, 17 Sep 2007 05:40:57 -0700 reply

Severity: serious => normal

... --simon, Thu, 20 Sep 2007 08:56:19 -0700 reply

Severity: normal => serious

I'll keep this serious, to remind us, since it's a visible error when the user tries to do something reasonable. Zwiki aims to never do that. (Sadly, it's not at all uncommon - is this inevitable or can we do better ?)

still open ? --simon, Thu, 01 May 2008 20:13:10 -0700 reply

No idea what this is.. has it gone away ?

... --simon, Thu, 01 May 2008 21:14:58 -0700 reply

Name: '#1373 AttributeError?: pt_macros' => '#1373 AttributeError?: pt_macros in plonr'

... --simon, Thu, 01 May 2008 21:15:22 -0700 reply

Name: '#1373 AttributeError?: pt_macros in plonr' => '#1373 AttributeError?: pt_macros in plone'

still open ? --Jordan Carswell, Fri, 02 May 2008 09:44:29 -0700 reply

Never could figure it and I had to drop it for another project. This summer I'll get back to it. Close this and I'll re-open if necessary. Thanks.

... --simon, Fri, 02 May 2008 10:30:12 -0700 reply

Status: open => closed