Enabling versioning for file type fails for pre-existing files.

3 messages Options
Embed this post
Permalink
sreid () Enabling versioning for file type fails for pre-existing files.
Reply Threaded More More options
Print post
Permalink
Plone Version Overview

    * Plone 3.3.1
    * CMF 2.1.2
    * Zope (Zope 2.10.9-final, python 2.4.3, linux2)
    * Python 2.4.3 (#1, Jul 27 2009, 17:57:39) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
    * PIL 1.1.6

I've just enabled versioning for files (in setup/types). I now have a history tab for pre-existing files, but when I try to access them I get an error message (traceback attached below). If I add a new file, it's history tab works as expected. The problem seems to be with files which were added to plone before enabling versioning.

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 216, in _exec
  Module Products.CacheSetup.patch_cmf, line 51, in FSPT_pt_render
  Module Products.CacheSetup.patch_cmf, line 126, in PT_pt_render
   - Warning: Macro expansion failed
   - Warning: exceptions.KeyError: 'view_macro'
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 861, in do_defineMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/xxx/webapps/zope/buildout/eggs/Products.CMFEditions-1.2.4-py2.4.egg/Products/CMFEditions/skins/CMFEditions/versions_history_form.pt
   - Line 7, Column 2
   - Expression: <PythonExpr history.getLength(countPurged=False)>
   - Names:
      {'container': <PloneSite at /Artik>,
       'context': <ATFile at /xxx/information/administrator-information/test-pages/test-docs/test-word-doc>,
       'default': ,
       'here': <ATFile at /xxx/information/administrator-information/test-pages/test-docs/test-word-doc>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1015f5ec>,
       'request': <HTTPRequest, URL=http://xxx/information/administrator-information/test-pages/test-docs/test-word-doc/versions_history_form>,
       'root': <Application at >,
       'template': <FSPageTemplate at /xxx/versions_history_form used for /Artik/information/administrator-information/test-pages/test-docs/test-word-doc>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'xxx'>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: history.getLength(countPurged=False)
  Module PythonExpr, line 1, in <expression>
AttributeError: 'list' object has no attribute 'getLength'
Karl Johan Kleist () Re: Enabling versioning for file type fails for pre-existing files.
Reply Threaded More More options
Print post
Permalink
Seems to be a bug, indeed. Do you have an account here https://dev.plone.org/plone/newticket ?

sreid wrote:
Plone Version Overview

    * Plone 3.3.1
    * CMF 2.1.2
    * Zope (Zope 2.10.9-final, python 2.4.3, linux2)
    * Python 2.4.3 (#1, Jul 27 2009, 17:57:39) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
    * PIL 1.1.6

I've just enabled versioning for files (in setup/types). I now have a history tab for pre-existing files, but when I try to access them I get an error message (traceback attached below). If I add a new file, it's history tab works as expected. The problem seems to be with files which were added to plone before enabling versioning.

(---)
AttributeError: 'list' object has no attribute 'getLength'
sreid () Re: Enabling versioning for file type fails for pre-existing files.
Reply Threaded More More options
Print post
Permalink
I'm new to plone.org, but it seems I am able to log into the issue tracker. I'll copy the details into a bug report, which I assume is what you are suggesting.

Karl Johan Kleist wrote:
Seems to be a bug, indeed. Do you have an account here https://dev.plone.org/plone/newticket ?