Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: @@images in review portlet #126

Closed
djowett opened this issue Mar 21, 2019 · 1 comment · Fixed by #130
Closed

AttributeError: @@images in review portlet #126

djowett opened this issue Mar 21, 2019 · 1 comment · Fixed by #130

Comments

@djowett
Copy link

djowett commented Mar 21, 2019

I'm seeing the above error in a review portlet which is trying to display a custom DX type.

See the traceback excerpt below

Setting imagescale like this in review.pt seems to fix it, but it doesn't "feel right" (TM)
imagescale python:context.get('@@images', None);

   - __traceback_info__: ([], '@@images')
AttributeError: @@images

 - Expression: "context/@@images"
 - Filename:   ... ts-4.3.4-py2.7.egg/plone/app/portlets/portlets/review.pt
 - Location:   (line 30: col 36)
 - Source:     imagescale context/@@images;
                          ^^^^^^^^^^^^^^^^
 - Arguments:  loop: {...} (1)
               repeat: {...} (0)
               views: <ViewMapper - at 0x7ff630b83650>
               obj: {...} (10)
               root: <ImplicitAcquisitionWrapper Zope at 0x7ff633b9ca50>
               traverse_subpath: <list - at 0x7ff630a44488>
               plone_layout: <LayoutPolicy plone_layout at 0x7ff630b83e90>
               request: <instance - at 0x7ff630a41cb0>
               wrapped_repeat: <SafeMapping - at 0x7ff630ea7628>
               target_language: en
               here: <ImplicitAcquisitionWrapper SportsChapDev2 at 0x7ff63419dd20>
               portal: <ImplicitAcquisitionWrapper SportsChapDev2 at 0x7ff632e33780>
               translate: <function translate at 0x7ff630e74050>
               supress_icon: False
               context: <ImplicitAcquisitionWrapper SportsChapDev2 at 0x7ff63419dd20>
               nothing: <NoneType - at 0x55cfc6f87560>
               modules: <instance - at 0x7ff63af12fc8>
               options: {...} (0)
               template: <ViewPageTemplateFile - at 0x7ff6311075d0>

Versions
Plone 5.1.4
plone.app.portlets-4.3.4

@pbauer
Copy link
Member

pbauer commented Aug 10, 2019

Same in 5.2. It seems a change in https://github.com/plone/plone.app.portlets/pull/85/files#diff-9034201a93fbdad0805c13c7ae7c4e21 (part of plone/Products.CMFPlone#1734) was incorrect.

@fgrcon: could you please have a look. It might be that imagescale context/@@images should rather be image_scale portal/@@image_scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants