plonegovbr / brasil.gov.tiles

Blocos de Conteúdo (Tiles) para sites do Governo Brasileiro

Home Page:https://plone.org.br/gov/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Erro ao popular galeria de vídeo

idgserpro opened this issue · comments

Usando IDG 2.1.1.

Ao tentar arrastar uma pasta ou coleção para um tile de galeria de vídeo, recebemos o seguinte erro:

galeria_video_server_error

Traceback:

User Name (User Id) siteadmin (siteadmin)
Request URL http://10.139.9.194:8081/plone/pasta-de-teste/titulo-da-capa-de-teste/@@updatetilecontent
Exception Type AttributeError
Exception Value 'list' object has no attribute 'items' - Expression: "view/results" - Filename: ... 2.7.egg/brasil/gov/tiles/tiles/templates/videogallery.pt - Location: (line 10: col 27) - Source: tal:define="results view/results; ^^^^^^^^^^^^ - Arguments: repeat: {...} (0) template: <ViewPageTemplateFile - at 0x7f34259e4ed0> views: <ViewMapper - at 0x7f342c0ea150> modules: <instance - at 0x7f3443c79248> args: <tuple - at 0x7f345745d050> here: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> user: <ImplicitAcquisitionWrapper - at 0x7f342e054140> nothing: <NoneType - at 0x7f3457255dc0> tile_id: ea10a538-f3c8-4da2-a719-a5f3f961a9eb container: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> request: <instance - at 0x7f3426dcc758> wrapped_repeat: <SafeMapping - at 0x7f3426e664c8> traverse_subpath: <list - at 0x7f3427c654d0> default: <object - at 0x7f3457433520> loop: {...} (0) context: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> view: <VideoGalleryTile videogallery at 0x7f3426b67bd0> translate: <function translate at 0x7f3425ba9578> root: <ImplicitAcquisitionWrapper Zope at 0x7f342e1fce10> options: {...} (0) target_language: pt_BR

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module collective.cover.browser.compose, line 64, in _call_
Module collective.cover.browser.compose, line 56, in render
Module plone.tiles.esi, line 87, in _call_
Module Products.Five.browser.pagetemplatefile, line 125, in _call_
Module Products.Five.browser.pagetemplatefile, line 59, in _call_
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 98, in _call_
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module f0d691fca0592141dc308d832188bec8, line 148, in render
Module five.pt.expressions, line 161, in _call_
Module collective.cover.tiles.list, line 120, in results

AttributeError: 'list' object has no attribute 'items' - Expression: "view/results" - Filename: ... 2.7.egg/brasil/gov/tiles/tiles/templates/videogallery.pt - Location: (line 10: col 27) - Source: tal:define="results view/results; ^^^^^^^^^^^^ - Arguments: repeat: {...} (0) template: <ViewPageTemplateFile - at 0x7f34259e4ed0> views: <ViewMapper - at 0x7f342c0ea150> modules: <instance - at 0x7f3443c79248> args: <tuple - at 0x7f345745d050> here: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> user: <ImplicitAcquisitionWrapper - at 0x7f342e054140> nothing: <NoneType - at 0x7f3457255dc0> tile_id: ea10a538-f3c8-4da2-a719-a5f3f961a9eb container: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> request: <instance - at 0x7f3426dcc758> wrapped_repeat: <SafeMapping - at 0x7f3426e664c8> traverse_subpath: <list - at 0x7f3427c654d0> default: <object - at 0x7f3457433520> loop: {...} (0) context: <ImplicitAcquisitionWrapper titulo-da-capa-de-teste at 0x7f34256ebbe0> view: <VideoGalleryTile videogallery at 0x7f3426b67bd0> translate: <function translate at 0x7f3425ba9578> root: <ImplicitAcquisitionWrapper Zope at 0x7f342e1fce10> options: {...} (0) target_language: pt_BR

Acredito ser necessário rever o método populate_with_object em

def populate_with_object(self, obj):
: a customização do tipo lista foi removida e isso pode ser um efeito colateral.

@idgserpro o problema foi corrigido, pode verificar se resolve o problema para você?