#3 — collective.solr breaks topic view when SearchableText field is used as criteria

StateResolved
Version:
AreaFunctionality
Issue typeBug
SeverityMedium
Submitted byAnton Stonor
Submitted onDec 04, 2008
Responsible Andreas Zeidler
Target release: 1.0
Return to tracker
Last modified on May 12, 2009 by Andreas Zeidler
Throws this traceback:

  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 216, in _exec
  Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
   - Warning: Macro expansion failed
   - Warning: exceptions.KeyError: 'fl_macro'
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 861, in do_defineMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 525, in do_optTag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 861, in do_defineMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 861, in do_defineMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 861, in do_defineMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/stonor/dev/solr/parts/plone/ATContentTypes/skins/ATContentTypes/atct_topic_view.pt
   - Line 35, Column 8
   - Expression: <PythonExpr here.queryCatalog(batch=True)>
   - Names:
      {'container': <PloneSite at /p1>,
       'context': <ATTopic at /p1/liste>,
       'default': <object object at 0xb7cfc528>,
       'here': <ATTopic at /p1/liste>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x102f59ac>,
       'request': <HTTPRequest, URL=http://localhost:8080/p1/liste/atct_topic_view>,
       'root': <Application at >,
       'template': <FSPageTemplate at /p1/atct_topic_view used for /p1/liste>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: here.queryCatalog(batch=True)
  Module PythonExpr, line 1, in <expression>
  Module Products.ATContentTypes.content.topic, line 467, in queryCatalog
   - __traceback_info__: (<ATTopic at /p1/liste>, {'SearchableText': 'anton'})
  Module Products.ZCatalog.Lazy, line 41, in __add__
TypeError: Can not concatenate objects. Both must be lazy sequences.
Steps to reproduce:
 * Create a Topic/collection
 * At the criteria tab, add SearchableText as a criteria
 * The view now shows a traceback
Added byAndreas ZeidleronDec 05, 2008 03:44 PM
Issue state: unconfirmedopen
Target release: None1.0
Responsible manager: (UNASSIGNED)witsch
hi anton,

we've also already seen this in our project, but didn't know how to reproduce so far (as the exception was only reported via mailinglogger). so thanks for helping with some valuable information here — i'll look into it asap...


andi
Added byAnton StonoronDec 08, 2008 01:17 PM
Sounds great, andi.

One idea could be to patch Products.ZCatalog.Lacy.__add__ to allow Lacy to concat with whatever result sequence comes from collective.solr (that is if a collective.solr sequence plays nice with LacyCat of cause).
Added byAnton StonoronDec 08, 2008 01:18 PM
Doh, Lazy with a "z".
Added byAndreas ZeidleronDec 08, 2008 01:22 PM
hmm, a catalog with lacy stuff in it? i didn't know we had that in zope? ;) i'll check it out, though! :)
Added byAndreas ZeidleronMay 12, 2009 03:10 PM
Issue state: ConfirmedResolved
this has been fixed in http://dev.plone.org/collective/changeset/85913
Added byAndreas ZeidleronMay 12, 2009 03:25 PM
fyi, the fix has been included in http://pypi.python.org/pypi/collective.solr/1.0b9

No responses can be added.