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

event_listing with end date query from collection #347

Open
petschki opened this issue Dec 17, 2021 · 1 comment
Open

event_listing with end date query from collection #347

petschki opened this issue Dec 17, 2021 · 1 comment

Comments

@petschki
Copy link
Member

Scenario:
Collection which should show events with their end date in the future as event_listing

What I expect:
Events are listed which are ending in ther future (already started events should be listed!)

What happens:

raceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 376, in publish_module
  Module ZPublisher.WSGIPublisher, line 271, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 58, in __call__
  Module zope.pagetemplate.pagetemplate, line 133, in pt_render
  Module Products.PageTemplates.engine, line 365, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 215, in render
  Module chameleon.utils, line 53, in raise_with_traceback
  Module chameleon.template, line 192, in render
  Module 6c4d0c78d5d05de63fbc2acfb0fb59c9, line 1067, in render
  Module b9fb2a6a0cab7fe0c1c938dc331cbdc8, line 880, in render_master
  Module b9fb2a6a0cab7fe0c1c938dc331cbdc8, line 1503, in render_content
  Module 6c4d0c78d5d05de63fbc2acfb0fb59c9, line 1052, in __fill_content_core
  Module 6c4d0c78d5d05de63fbc2acfb0fb59c9, line 140, in render_content_core
  Module zope.tales.expressions, line 250, in __call__
  Module Products.PageTemplates.Expressions, line 221, in _eval
  Module Products.PageTemplates.Expressions, line 152, in render
  Module plone.memoize.view, line 59, in memogetter
  Module plone.app.event.browser.event_listing, line 171, in events
  Module plone.app.event.base, line 285, in expand_events
  Module DateTime.DateTime, line 1372, in lessThanEqualTo
TypeError: '<=' not supported between instances of 'int' and 'datetime.datetime'

Investigation:
The start/end range perparer in @@event_listing view somehow gets DateTime as start if you only have end in your query ... more digging needed

@petschki
Copy link
Member Author

There are also a few other issues with start/end boundaries which @ksuess and me noticed here plone/plone.app.standardtiles#125 ... we also like to implement the limit to expand_events somehow, but this needs more investigations.

/cc @thet you might have more insights for us to get on track ...

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

1 participant