[Nuxeo-tickets] [Nuxeo Repository] #1890: Image without image breaks Image Gallery

Nuxeo Repository trac at nuxeo.com
Tue Feb 12 11:27:46 CET 2008


#1890: Image without image breaks Image Gallery
-------------------------+--------------------------------------------------
 Reporter:  gracinet     |       Owner:  madarche     
     Type:  defect       |      Status:  new          
 Priority:  P2           |   Milestone:  CPS 3.4.6    
Component:  CPSDocument  |     Version:  TRUNK        
 Severity:  normal       |    Keywords:  image gallery
-------------------------+--------------------------------------------------
 In an Image Gallery, if there is an Image document in which no image file
 has been stored (field name is preview), the view page of Image Gallery is
 broken (layout_image_gallery_view). One gets the Zope auth popup.

 Extract from traceback info:

 {{{
 URL: file:CPSDocument/skins/cps_document/layout_imagegallery_view.pt

 Line 49, Column 10

 Expression: <PythonExpr here.getImgTag(
 item.absolute_url_path()+'/preview',

 (...)

     *  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
       __traceback_info__: here.getImgTag(
 item.absolute_url_path()+'/preview',
 base_url='',width=th_width,height=th_height, keep_ratio=1,
 img=item.restrictedTraverse('preview'))
     * Module Python expression "here.getImgTag(
 item.absolute_url_path()+'/preview',
 base_url='',width=th_width,height=th_height, keep_ratio=1,
 img=item.restrictedTraverse('preview'))", line 1, in <expression>
     * Module OFS.Traversable, line 250, in restrictedTraverse
     * Module OFS.Traversable, line 218, in unrestrictedTraverse
       __traceback_info__: ([], 'preview')

 }}}

 Indeed, it seems that a protection against None is missing somewhere.

 Also, the image file is not mandatory in Image doc type (will change that
 in my specific project)

-- 
Ticket URL: <https://svn.nuxeo.org/trac/pub/ticket/1890>
Nuxeo Repository <http://www.cps-project.org/>
Nuxeo Repository



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.