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

error applying ftwcalendar_view over a Plone 4.3.7 collection of events #15

Open
luizgsbraz opened this issue May 31, 2016 · 7 comments
Assignees

Comments

@luizgsbraz
Copy link

It raises an error when trying to apply the ftpcalender_view to a collection of events (i.e. TOPIC),
over a Plone 4.3.7 site:

As a consequence, the site shows the calendar without the events that compose the collection.

The error is listed bellow:

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 ftw.calendar.browser.calendarupdateview, line 80, in __call__
  Module ftw.calendar.browser.calendarupdateview, line 23, in generate_json_calendar_source
  Module ftw.calendar.browser.calendarupdateview, line 36, in get_event_brains
TypeError: queryCatalog() got an unexpected keyword argument 'REQUEST'

Surprisingly, the same error does not raise for TOPICs. Only for collection.

Besides, it works to apply the same view to a folder of events too.

It is supposed the error is in the 35-36 line of ftw.calendar/ftw/calendar/browser/calendarupdateview.py:

35            return self.context.aq_inner.queryCatalog(
36                REQUEST=self.request, **args)

For some reason, REQUEST seams not to be available when applying the view to collections.

@mirandadam
Copy link

Hi @luizgsbraz, did you get this to work with an earlier version of Plone? The readme only mention Plone 4.1 and 4.2. Please provide more information.

@maethu
Copy link
Contributor

maethu commented Aug 22, 2016

Thanks for submitting the Issue. Someone will have a look. It seems like it does not fully support Topics, or the API changed.

\cc @raphael-s

@mirandadam
Copy link

mirandadam commented Sep 15, 2016

Hi, @maethu, does the fork in #13 help in anything? Maybe @cguardia knows the answer. If it does, is it possible to cherry pick a patch from that?
Edit: Maybe it does. The fork implements changes around line 35 of ftw/calendar/browser/calendarupdateview.py, which seems to be exactly where the issue is.

@cguardia
Copy link
Contributor

@maethu @mirandadam Yeah, that's fixed here: #14

Sadly, I haven't been able to complete the PR yet.

@mirandadam
Copy link

Awesome!

@mirandadam
Copy link

Hi, any news on this? this would also solve #13.

@raphael-s
Copy link

Afaik we are still waiting for @cguardia to complete his PR #14 which should solve this issue.

//cc @jone

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

No branches or pull requests

5 participants