Ticket #440 (new defect)

Opened 15 years ago

Last modified 14 years ago

layout_page_view fails on /archivedRevision/.../view

Reported by: jmorliaguet Owned by: fguillaume
Priority: P3 Milestone: CPS 3.5.7
Component: CPSDocument Version: CPS 3.2 branch
Severity: normal Keywords:
Cc:

Description (last modified by fguillaume) (diff)

layout_page_view.pt gives an error when trying to access archived revisions of a page.

# <FSPageTemplate at /cpstest/layout_page_view used for /cpstest/portal_repository/19683214490001> # Module TAL.TALInterpreter, line 190, in call # Module TAL.TALInterpreter, line 234, in interpret # Module TAL.TALInterpreter, line 460, in do_setLocal_tal # Module Products.PageTemplates.TALES, line 221, in evaluate Line 1, Column 0 Expression: <PythonExpr? test(proxy.id in page_ids, page_ids.index(proxy.id), -1)>

  • traceback_info: test(proxy.id in page_ids, page_ids.index(proxy.id), -1)
  • Module Python expression "test(proxy.id in page_ids,

page_ids.index(proxy.id), -1)", line 1, in <expression>

ValueError?: list.index(x): x not in list

Change History

comment:1 Changed 15 years ago by fguillaume

Could you try replacing the stupid:

test(proxy.id in page_ids, page_ids.index(proxy.id), -1)

with

proxy.id not in page_ids and -1 or page_ids.index(proxy.id)

and see if it goes further ?

comment:2 Changed 15 years ago by jmorliaguet

it goes further but it fails on:

  • <a href="." tal:attributes="href python:book_url+'/'+page_ids[page_index-1]"

it seems that page_ids == []

'book' is not the book probably because of proxy/aq_inner/aq_parent

proxy nocall:options/proxy; book nocall:proxy/aq_inner/aq_parent; pages book/getFolderContents;

URL: /cpsf/portal_skins/custom/layout_page_view Line 22, Column 8 Expression: <PythonExpr? book_url+'/'+page_ids[page_index-1]> Names:

  • Module Products.PageTemplates.ZRPythonExpr, line 47, in call traceback_info: book_url+'/'+page_ids[page_index-1]
  • Module Python expression "book_url+'/'+page_ids[page_index-1]", line 1, in

<expression>

IndexError?: list index out of range

comment:3 Changed 14 years ago by fguillaume

  • Description modified (diff)
  • Milestone changed from unspecified to CPS 3.5.0
Note: See TracTickets for help on using tickets.