contexte : Zope/(Zope 2.7.4-0, python 2.3.4, linux2) ZServer/1.1 CPS/3.2

Bonjour,

je voudrais classer mon forum par thème (sort_by=='subject') en cliquant sur
le titre de colonne mais je rencontre un pb :

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.CMFCore.PortalContent, line 116, in __call__
  Module Products.CMFCore.FSPythonScript, line 104, in __call__
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 160, in _exec
  Module None, line 9, in forum_view
   - <FSPythonScript at /iliad/forum_view used for
/iliad/sections/rh/test_forum>
   - Line 9
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 191, in _exec
  Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
  Module Products.PageTemplates.PageTemplate, line 96, in pt_render
   - <FSPageTemplate at /iliad/forum_view_main used for
/iliad/sections/rh/test_forum>
  Module TAL.TALInterpreter, line 190, in __call__
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 671, in do_useMacro
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 671, in do_useMacro
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 671, in do_useMacro
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 613, in do_loop_tal
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 613, in do_loop_tal
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 613, in do_loop_tal
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 694, in do_defineSlot
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 694, in do_defineSlot
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 694, in do_defineSlot
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 569, in do_insertStructure_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - Line 53, Column 8
   - Expression: <PythonExpr here.forum_view_threads(
post_id=post_id,
is_reviewer=is_reviewer,
REQUEST=here.REQUEST)>
   - Names:
      {'container': <AcossDefaultSite instance at 0280BC50>,
       'context': <ProxyFolder at /iliad/sections/rh/test_forum>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x017B1EB8>,
       'here': <ProxyFolder at /iliad/sections/rh/test_forum>,
       'loop': <SafeMapping instance at 03BC1F10>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporterinstance at
0x017AAAD0>,
       'nothing': None,
       'options': {'post_id': 'test_2', 'args': ()},
       'repeat': <SafeMapping instance at 03BC1F10>,
       'request': <HTTPRequest, URL=
http://localhost:8080/iliad/sections/rh/test_forum>,
       'root': <Application instance at 0280B800>,
       'template': <FSPageTemplate at /iliad/forum_view_main used for
/iliad/sections/rh/test_forum>,
       'traverse_subpath': [],
       'user': <CPSUser MLBAOUCH>}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: here.forum_view_threads(
post_id=post_id,
is_reviewer=is_reviewer,
REQUEST=here.REQUEST)
  Module Python expression "here.forum_view_threads(
post_id=post_id,
is_reviewer=is_reviewer,
REQUEST=here.REQUEST)", line 1, in <expression>
  Module Products.CMFCore.FSPythonScript, line 104, in __call__
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 160, in _exec
  Module None, line 102, in forum_view_threads
   - <FSPythonScript at /iliad/forum_view_threads used for
/iliad/sections/rh/test_forum>
   - Line 102
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 191, in _exec
  Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
  Module Products.PageTemplates.PageTemplate, line 96, in pt_render
   - <FSPageTemplate at /iliad/forum_view_threads_main used for
/iliad/sections/rh/test_forum>
  Module TAL.TALInterpreter, line 190, in __call__
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 637, in do_condition
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 569, in do_insertStructure_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - Line 107, Column 6
   - Expression: <PythonExpr here.post_tree(descendants=batched_desc,
post_id=post_id,
frm_start=batch_start,
sort_by=sort_by,
display_mode=display_mode,
wf_display_mode=wf_display_mode,
REQUEST=here.REQUEST,
forum=forum)>
   - Names:
      {'container': <AcossDefaultSite instance at 0280BC50>,
       'context': <ProxyFolder at /iliad/sections/rh/test_forum>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x017B1EB8>,
       'here': <ProxyFolder at /iliad/sections/rh/test_forum>,
       'loop': <SafeMapping instance at 025D6330>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporterinstance at
0x017AAAD0>,
       'nothing': None,
       'options': {'args': (),
                   'descendants': [{'author': 'MLBAOUCH',
                                    'creation': DateTime('2007/10/10 11:40:
20.480 GMT+2'),
                                    'id': 'test5921',
                                    'locked': False,
                                    'message': 'coucou',
                                    'parent_id': None,
                                    'published': True,
                                    'review_state': 'published',
                                    'subject': 'test '},
                                   {'author': 'MLBAOUCH',
                                    'creation': DateTime('2007/10/10 10:49:
53.713 GMT+2'),
                                    'id': 'test_2',
                                    'locked': False,
                                    'message': 'question',
                                    'parent_id': None,
                                    'published': True,
                                    'review_state': 'published',
                                    'subject': 'test 2'},
                                   {'author': 'MLBAOUCH',
                                    'creation': DateTime('2007/10/10 11:06:
33.933 GMT+2'),
                                    'id': 'test_mlb',
                                    'locked': False,
                                    'message': '<P>question</P>',
                                    'parent_id': None,
                                    'published': True,
                                    'review_state': 'published',
                                    'subject': 'test mlb'},
                                   {'author': 'MLBAOUCH',
                                    'creation': DateTime('2007/10/10 13:40:
55.373 GMT+2'),
                                    'id': 'test8862',
                                    'locked': False,
                                    'message': '<P>-</P>',
                                    'parent_id': None,
                                    'published': True,
                                    'review_state': 'published',
                                    'subject': 'test'},
                                   {'author': 'MLBAOUCH',
                                    'creation': DateTime('2007/10/10 13:35:
30.953 GMT+2'),
                                    'id': 'test4705',
                                    'locked': False,
                                    'message': 'df',
                                    'parent_id': None,
                                    'published': True,
                                    'review_state': 'published',
                                    'subject': 'test'}],
                   'display_mode': 'title',
                   'forum': <CPSForum at
/iliad/portal_repository/1256494074__0001>,
                   'is_reviewer': 1,
                   'post_id': None,
                   'sort_by': 'subject',
                   'wf_display_mode': 'wf_icon'},
       'repeat': <SafeMapping instance at 025D6330>,
       'request': <HTTPRequest, URL=
http://localhost:8080/iliad/sections/rh/test_forum>,
       'root': <Application instance at 0280B800>,
       'template': <FSPageTemplate at /iliad/forum_view_threads_main used
for /iliad/sections/rh/test_forum>,
       'traverse_subpath': [],
       'user': <CPSUser MLBAOUCH>}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: here.post_tree(descendants=batched_desc,
post_id=post_id,
frm_start=batch_start,
sort_by=sort_by,
display_mode=display_mode,
wf_display_mode=wf_display_mode,
REQUEST=here.REQUEST,
forum=forum)
  Module Python expression "here.post_tree(descendants=batched_desc,
post_id=post_id,
frm_start=batch_start,
sort_by=sort_by,
display_mode=display_mode,
wf_display_mode=wf_display_mode,
REQUEST=here.REQUEST,
forum=forum)", line 1, in <expression>
  Module Products.CMFCore.FSPythonScript, line 104, in __call__
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 160, in _exec
  Module None, line 229, in post_tree
   - <FSPythonScript at /iliad/post_tree used for
/iliad/sections/rh/test_forum>
   - Line 229
  Module None, line 113, in getBranches
   - <FSPythonScript at /iliad/post_tree used for
/iliad/sections/rh/test_forum>
   - Line 113
  Module AccessControl.ZopeGuards, line 67, in guarded_getitem
KeyError: 0

merci pour votre aide.
_______________________________________________
cps-users-fr 
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>

Répondre à