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

Installation in a populated site: problems with getRawRelatedItems metadata #2

Open
cekk opened this issue Mar 30, 2015 · 0 comments
Open
Labels

Comments

@cekk
Copy link
Member

cekk commented Mar 30, 2015

It seems that the installation in a populated site, have some problems with the new metadata "getRawRelatedItems".

If an item doesn't have any related item, the value of the metadata is "Missing.Value" and not an empty list.
A catalog update or just a relateditems reindex should resolve the problem.

Here is the traceback:

 Module zope.tales.tales, line 696, in evaluate
   - URL: /Users/cekk/Documents/workspace/buildout_prova_425/eggs/cciaa.modulistica-2.1.0-py2.7.egg/cciaa/modulistica/browser/cciaa_modulistica_view.pt
   - Line 23, Column 8
   - Expression: <PythonExpr (view.count_related_items(folderContents))>
   - Names:
      {'args': (),
       'container': <ATFolder at /Plone/cartella-a>,
       'context': <ATFolder at /Plone/cartella-a>,
       'default': <object object at 0x100d16bf0>,
       'here': <ATFolder at /Plone/cartella-a>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10c0f3aa0>,
       'request': <HTTPRequest, URL=http://localhost:8080/Plone/cartella-a/cciaa_modulistica_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x108d13d10>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /Users/cekk/Documents/workspace/buildout_prova_425/eggs/cciaa.modulistica-2.1.0-py2.7.egg/cciaa/modulistica/browser/cciaa_modulistica_view.pt object at 0x10c0d3b90>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x10c01c690>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.count_related_items(folderContents))
  Module <string>, line 1, in <module>
  Module cciaa.modulistica.browser.modulistica, line 64, in count_related_items
TypeError: object of type 'Missing.Value' has no len()```
@cekk cekk added the bug label Mar 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant