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

Plone 5.1: Collection view fails with "AttributeError: 'FlareContentListingObject' object has no attribute 'UID'" #182

Open
tisto opened this issue Jan 23, 2018 · 6 comments

Comments

@tisto
Copy link
Member

tisto commented Jan 23, 2018

Plone 5.1 with collective.solr master branch.

  1. Create collection with query:
  >>> query = [{'i': 'SearchableText',
  ...           'o': 'plone.app.querystring.operation.string.contains',
  ...           'v': 'new'}]
  1. Go to collection view
We’re sorry, but there seems to be an error…
Here is the full error message:

Display traceback as text

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 Products.Five.browser.metaconfigure, line 485, 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 137, 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 54dd017647aab0815de7ab3bf1f54b24.py, line 1840, in render
Module 075cbb71967c0a55180ae8feb97872ee.py, line 1223, in render_master
Module 075cbb71967c0a55180ae8feb97872ee.py, line 420, in render_content
Module 54dd017647aab0815de7ab3bf1f54b24.py, line 1828, in __fill_content_core
Module 54dd017647aab0815de7ab3bf1f54b24.py, line 538, in render_content_core
Module 54dd017647aab0815de7ab3bf1f54b24.py, line 363, in render_listing
Module 54dd017647aab0815de7ab3bf1f54b24.py, line 1637, in render_entries
Module 54dd017647aab0815de7ab3bf1f54b24.py, line 1356, in render_listitem
Module plone.memoize.volatile, line 66, in replacement
Module plone.namedfile.scaling, line 505, in _scale_cachekey
AttributeError: 'FlareContentListingObject' object has no attribute 'UID'

 - Expression: "python:image_scale.tag(item, 'image', scale=thumb_scale_list, css_class=img_class)"
 - Filename:   ... .egg/plone/app/contenttypes/browser/templates/listing.pt
 - Location:   (line 67: col 53)
 - Source:     ... python:image_scale.tag(item, 'image', scale=thumb_scale_list, css_class=img_class) ...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7f894e96c8d0>
               views: <ViewMapper - at 0x7f8941063510>
               modules: <instance - at 0x7f8958696368>
               args: <tuple - at 0x7f8960f2a050>
               here: <ImplicitAcquisitionWrapper my-collection at 0x7f89410f5280>
               user: <ImplicitAcquisitionWrapper - at 0x7f89493d07d0>
               nothing: <NoneType - at 0x8f5320>
               container: <ImplicitAcquisitionWrapper my-collection at 0x7f89410f5280>
               request: <instance - at 0x7f8940f2d9e0>
               wrapped_repeat: <SafeMapping - at 0x7f894ac2dc58>
               traverse_subpath: <list - at 0x7f8941332908>
               default: <object - at 0x7f8960e4b470>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper my-collection at 0x7f89410f5280>
               view: <SimpleViewClass from /home/timo/.buildout/eggs/plone.app.contenttypes-1.4.7-py2.7.egg/plone/app/contenttypes/browser/templates/listing.pt listing_view at 0x7f894ac57050>
               translate: <function translate at 0x7f89493bd848>
               root: <ImplicitAcquisitionWrapper Zope at 0x7f89493d1d20>
               options: {...} (0)
               target_language: <NoneType - at 0x8f5320>
@tisto
Copy link
Member Author

tisto commented Jan 23, 2018

Failure on Travis: https://travis-ci.org/collective/collective.solr/jobs/332263844

File "/home/travis/build/collective/collective.solr/src/collective/solr/tests/collections.txt", line 30, in collections.txt
Failed example:
    browser.open(portal[foo].absolute_url())
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest collections.txt[16]>", line 1, in <module>
        browser.open(portal[foo].absolute_url())
      File "/home/travis/buildout-cache/eggs/zope.testbrowser-3.11.1-py2.7.egg/zope/testbrowser/browser.py", line 240, in open
        self.mech_browser.open(url, data)
      File "/home/travis/buildout-cache/eggs/mechanize-0.2.5-py2.7.egg/mechanize/_mechanize.py", line 203, in open
        return self._mech_open(url, data, timeout=timeout)�[0m
      File "/home/travis/buildout-cache/eggs/mechanize-0.2.5-py2.7.egg/mechanize/_mechanize.py", line 255, in _mech_open
        raise response
    HTTPError: HTTP Error 500: Internal Server Error

@tisto
Copy link
Member Author

tisto commented Jan 23, 2018

@gforcada it seems FlareContentListingObject stopped implementing the IContentListingObject interface in Plone 5.1. Was the PLIP to merge c.indexing into the core ever tested with collective.solr?

@gforcada
Copy link
Member

@tisto yes it was, and I wanted to provide a pull request for it, but at that time there was a major refactoring (I guess the 5.0 release) and somehow it fail through the cracks on my todo list

@tisto
Copy link
Member Author

tisto commented Jan 23, 2018

@gforcada ok, good. There is an open pull request now:

#183

What kind of amendments do we have to do on c.solr?

@tisto
Copy link
Member Author

tisto commented Jan 24, 2018

@gforcada do you plan to still create a pull request and work on this?

@gforcada
Copy link
Member

yes/no... whenever we (at der Freitag) upgrade to 5.1 I will work on it for sure, but as that's not high on our top priority list it can take a while, at least I will not start that right now.

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

No branches or pull requests

2 participants