Ticket #8212 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

thumbnail view isn't working when another type than "image" is in a folder (Plone 3.1.2)

Reported by: renfer Owned by: esteele
Priority: minor Milestone: 3.1.3
Component: Unknown Version:
Keywords: Cc: christian@…

Description

This bug was fixed in 3.1.1, but it came back with 3.1.2 Plone version.

Thumbnail view works fine as long as there are only images in a folder.

HERE is the error message:

Time 2008/06/09 09:22:25.435 GMT+2 User Name (User Id) renfer (renfer) Request URL  http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/atct_album_view Exception Type TypeError Exception Value list indices must be integers

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.CMFCore.FSPageTemplate, line 155, in pt_render
  • Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  • Module zope.pagetemplate.pagetemplate, line 117, in pt_render Warning: Macro expansion failed Warning: exceptions.KeyError: 'fl_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 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 525, in do_optTag
  • 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 861, in do_defineMacro
  • 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 855, in do_condition
  • 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 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 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 855, in do_condition
  • 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 855, in do_condition
  • 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 891, in do_useMacro
  • 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:/srv/zope/dev/zope/instance1/parts/plone/CMFPlone/skins/plone_templates/batch_macros.pt Line 9, Column 0 Expression: <PathExpr standard:u'batch/pagenumber'> Names:

{'container': <PloneSite at /zope>,

'context': <ATFolder at /zope/documentation/illustrations>, 'default': <object object at 0x2b7131475200>, 'here': <ATFolder at /zope/documentation/illustrations>, 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x2aaaac29f7a0>, 'request': <HTTPRequest, URL= http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/atct_album_view>, 'root': <Application at >, 'template': <FSPageTemplate at /zope/atct_album_view used for /zope/documentation/illustrations>, 'traverse_subpath': [], 'user': <PloneUser 'renfer'>}

  • Module zope.tales.expressions, line 217, in call
  • Module Products.PageTemplates.Expressions, line 153, in _eval
  • Module zope.tales.expressions, line 124, in _eval
  • Module Products.PageTemplates.Expressions, line 83, in boboAwareZopeTraverse
  • Module zope.traversing.adapters, line 164, in traversePathElement traceback_info: ([<Products.ZCatalog.Catalog.mybrains object at 0x2aaaac00d9f0>], 'pagenumber')
  • Module zope.traversing.adapters, line 49, in traverse traceback_info: ([<Products.ZCatalog.Catalog.mybrains object at 0x2aaaac00d9f0>], 'pagenumber', [])
  • Module Products.ZCatalog.Lazy, line 144, in getitem

TypeError: list indices must be integers

Display traceback as text

REQUEST form -C cookies utmz '40541481.1212995350.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)' statusmessages None ac '9Xb4JMcZSjuRpCoOtRufFIUVS3UgcmVuZmVy' utma '40541481.3007447270192238000.1212995350.1212995350.1212995350.1' utmb '40541481.9.10.1212995350' utmc '40541481' lazy items SESSION <bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>> other _oai_cache {46912503717840: <Products.CMFCore.ActionInformation.oai instance at 0x2aaaac2b0cb0>} TraversalRequestNameStack [] LANGUAGE u'en' AUTHENTICATED_USER <PloneUser 'renfer'> URL ' http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/atct_album_view' VIRTUAL_URL ' http://zopedev.edutonic.net/instance1/zope/documentation/illustrations' VirtualRootPhysicalPath (,) SERVER_URL ' http://zopedev.edutonic.net' LANGUAGE_TOOL <Products.PloneLanguageTool.LanguageTool.LanguageBinding instance at 0x2aaaac2b81b8> AUTHENTICATION_PATH 'zope' traverse_subpath [] _ec_cache {46912503717840: <Products.PageTemplates.Expressions.ZopeContext object at 0x2aaaac2a9090>} ac '9Xb4JMcZSjuRpCoOtRufFIUVS3UgcmVuZmVy' PUBLISHED <FSPageTemplate at /zope/atct_album_view used for /zope/documentation/illustrations> _pts_is_rtl False ACTUAL_URL ' http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/' VIRTUAL_URL_PARTS (' http://zopedev.edutonic.net', 'instance1', 'zope/documentation/illustrations') URL0  http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/atct_album_view URL1  http://zopedev.edutonic.net/instance1/zope/documentation/illustrations URL2  http://zopedev.edutonic.net/instance1/zope/documentation URL3  http://zopedev.edutonic.net/instance1/zope URL4  http://zopedev.edutonic.net/instance1 URL5  http://zopedev.edutonic.net BASE0  http://zopedev.edutonic.net BASE1  http://zopedev.edutonic.net/instance1 BASE2  http://zopedev.edutonic.net/instance1/zope BASE3  http://zopedev.edutonic.net/instance1/zope/documentation BASE4  http://zopedev.edutonic.net/instance1/zope/documentation/illustrations BASE5  http://zopedev.edutonic.net/instance1/zope/documentation/illustrations/atct_album_view environ HTTP_MAX_FORWARDS '10' HTTP_REFERER ' http://zopedev.edutonic.net/instance1/zope/documentation/illustrations' HTTP_ACCEPT_LANGUAGE 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' SERVER_SOFTWARE 'Zope/(Zope 2.10.6-final, python 2.4.5, linux2) ZServer/1.1 Plone/3.1.2' SCRIPT_NAME REQUEST_METHOD 'GET' PATH_INFO '/VirtualHostBase/http/zopedev.edutonic.net:80/VirtualHostRoot/_vh_instance1//zope/documentation/illustrations/' SERVER_PROTOCOL 'HTTP/1.1' channel.creation_time 1212996145 HTTP_X_FORWARDED_SERVER 'icpdev.ge.ch' CONNECTION_TYPE 'Keep-Alive' HTTP_ACCEPT_CHARSET 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' HTTP_USER_AGENT 'Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5' HTTP_COOKIE 'utma=40541481.3007447270192238000.1212995350.1212995350.1212995350.1; utmb=40541481.9.10.1212995350; utmc=40541481; utmz=40541481.1212995350.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ac="9Xb4JMcZSjuRpCoOtRufFIUVS3UgcmVuZmVy"; statusmessages="AaRWaWV3IGNoYW5nZWQuaW5mbw=="' SERVER_NAME '0.0.0.0' REMOTE_ADDR '127.0.0.1' HTTP_VIA '1.1 icpdev.ge.ch' PATH_TRANSLATED '/VirtualHostBase/http/zopedev.edutonic.net:80/VirtualHostRoot/_vh_instance1/zope/documentation/illustrations' SERVER_PORT '12000' HTTP_HOST 'localhost:12000' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' GATEWAY_INTERFACE 'CGI/1.1' HTTP_X_FORWARDED_FOR '81.56.152.200' HTTP_X_FORWARDED_HOST 'zopedev.edutonic.net' HTTP_ACCEPT_ENCODING 'gzip,deflate'

Change History

comment:1 Changed 6 years ago by DaftDog

  • Cc christian@… added

I can verify this, any quick fixes around?

comment:2 Changed 6 years ago by duto_guerra

I also have this problem, any workaournds?

comment:3 in reply to: ↑ description ; follow-up: ↓ 4 Changed 6 years ago by esteele

I can confirm several other users here running into this issue.

On the front page of a Plone site, changing the display (which is probably one of the first several things a new user tries) will break the page and remove the ability to change the display back.

FWIW, for those running into this, a quick workaround (at least to get back to a point where you can actually change the folder display and/or view the folder) is to add /selectViewTemplate?templateId=folder_listing to the end of your url.

comment:4 in reply to: ↑ 3 Changed 6 years ago by esteele

  • Status changed from new to assigned
  • Owner changed from nobody to esteele

Problem occurs in  http://dev.plone.org/plone/browser/CMFPlone/branches/3.1/skins/plone_content/folder_listing.pt?rev=19746#L47 since limit_display appears to be a string instead of the expected integer. I'll get a test and fix committed tomorrow.

comment:5 Changed 6 years ago by esteele

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [21227]) Added a check for an existing batch. atct_album_view should no longer break when no images exist in a folder. Closes #8212.

Note: See TracTickets for help on using tickets.