Jarn / collective.solr

9 stars 1 forks source link

TypeError: ('Could not adapt', <collective.solr.parser.SolrResponse object at 0x9471150>, <InterfaceClass plone.app.contentlisting.interfaces.IContentListing>) #20

Closed tkimnguyen closed 11 years ago

tkimnguyen commented 11 years ago

I've got a pretty plain vanilla Plone 4.2.2 using collective.solr on a CentOS 5.4 box. When I use the search page, I get this error stack.

I saw that Florian Schultze had run into this a few weeks ago but could not find his solution (it was a chat log).

2012-12-03 15:50:08 ERROR Zope.SiteErrorLog 1354571408.130.630148253795 http://plone4.webcluster.uwosh.edu:8080/CCDET/@@updated_search
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Products.Five.browser.metaconfigure, line 476, 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 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /opt/Plone-4.2.2/buildout-cache/eggs/plone.app.search-1.0.6-py2.7.egg/plone/app/search/updated_search.pt
   - Line 2, Column 0
   - Expression: <PythonExpr (view.results(b_start=b_start))>
   - Names:
      {'args': (),
       'container': <PloneSite at /CCDET>,
       'context': <PloneSite at /CCDET>,
       'default': <object object at 0x2af3e3fc5b40>,
       'here': <PloneSite at /CCDET>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x946b368>,
       'request': <HTTPRequest, URL=http://plone4.webcluster.uwosh.edu:8080/CCDET/@@updated_search>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x72bc5d0>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'kimadmin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /opt/Plone-4.2.2/buildout-cache/eggs/plone.app.search-1.0.6-py2.7.egg/plone/app/search/updated_search.pt object at 0x9461c50>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x9461910>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.results(b_start=b_start))
  Module <string>, line 1, in <module>
  Module plone.app.search.browser, line 58, in results
TypeError: ('Could not adapt', <collective.solr.parser.SolrResponse object at 0x9471150>, <InterfaceClass plone.app.contentlisting.interfaces.IContentListing>)
tkimnguyen commented 11 years ago

Ah, I see there was a commit that fixes this issue, for unreleased collective.solr 3.1. Thank you :)

ckagger commented 11 years ago

Which commit was that, tkimnguyen? Should I pull the 3.1?

ckagger commented 11 years ago

I've gone through the commit history, and it's kind of a mystery which commit fixes this problem. The 3.1 release only has very little commit history on the master branch, and the other branches are apparently older. Am I missing something?

ckagger commented 11 years ago

I'm still getting this error after installing the latest unreleased version from github. I think this issue should probably be reopened.

If I'm able to solve this, I'll post a solution/patch here. @tkimnguyen, if you can remember the commit which solved this I'll be very grateful :-)

tkimnguyen commented 11 years ago

Sorry, I was not receiving notifications on this issue; I am now. I'm trying now to reload my brain :)

tkimnguyen commented 11 years ago

ok looking at the commit history, I think I was referring to the commits from Dec. 4, 2012. To get those commits on my server I think I just grabbed the source with git with mr.developer (ie. I may have skipped looking for a release or egg).

https://github.com/collective/collective.solr/commits/master

Mention ContentListing support in CHANGES ec18e4d935 Browse code csenger authored 3 months ago

Fix FlareContentListingObject.EffectiveDate() … f4ac890975 Browse code csenger authored 3 months ago Nov 28, 2012

Fix several FlareContentListingObject methods 318e192906 Browse code csenger authored 3 months ago