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

Agenda include template produces errors not a list of events #3

Open
brookinsconsulting opened this issue Feb 2, 2023 · 6 comments

Comments

@brookinsconsulting
Copy link
Contributor

Hello again, I am getting some errors when trying to use the agenda include template and I'm really not sure how to fix these errors in debug mode.

@brookinsconsulting
Copy link
Contributor Author

9D3D3F3F-492C-4BD0-839F-79F735436EE3

@pkamps
Copy link
Member

pkamps commented Feb 14, 2023

Hi,

sorry took some time to look at this issue. I refactored the extension quite a bit and those changes have not been tested very well.
The fetch function in the agenda.tpl is returning objects of the class MugoCalendarEvent. The template was trying to access properties of those objects but it could not.
I fixed the MugoCalendarEvent class to allow templates to access the required properties. The bug in your screenshot should be fix in master now.
Please let me know if you need any other help with this extension.

@brookinsconsulting
Copy link
Contributor Author

Hello @pkamps thank you very much for your work on this issue. I am happy to test your changes.

I find I have more questions with testing these and now other features. Could you include type in the attributes shared as that would at least let us tell if events being returned are recurring type. Also could you include some time to look at how unmanageable or understandable the events agenda.tpl results included are. I have just 10 events all weekly repeating events. very simple but agenda work you did now displays near 100 by default of reoccurring events, if i add a limit=10 to the template include as a parameter the list still is ordered oddly and the events repeating in this list when they are not more than weekly events. I'll include another screenshot.
adgenda-fetch-with-mugo-comparision

I had a need to support an ezwebin themed coffee shop that used the default calendar until mugo released their calendar. I had to write my own list calendar events view which looks nicely like this, showing all events and their first event and when it repeats
adgenda-fetch
.
It would be nice if the agenda include template could be formatted more like my example and consist of events first next repeating event time and when they repeat next. In my full view for the event object we convey full schedule of repetitions in the event template. it would be nice if your templates iterated over the datatype content to show multiple repeating event times in the full view template.

full-event

mugo_calendar_module_view
Also I tested the mugo calendar view module view with the required parent_node_id variable set. but the calendar is not displayed and no errors are dispalyed. I had the same results when trying to use the include/calendar.tpl template. This might belong in a separate issue as well. let me know you thoughts.

Cheers,
Broookins Consulting

@brookinsconsulting
Copy link
Contributor Author

@pkamps on second thought, could you also offer the recurrence attribute as well.

@pkamps
Copy link
Member

pkamps commented Mar 1, 2023

Hi,

the agenda template is resolving repeating events. It's possible that it's not working correctly but I believe you are looking for something different. It looks like you are just listing the calendar events with details like Name, Description, Recurrence Rule.
In other words, you don't want to use the "fetch( 'mugo_calendar', 'events'...)" - you want to fetch the nodes (with the mugo_calendar datatype). Then render each node accordingly. The mugo_calendar attribute should allow you to get the recurrence rules.

You're probably right about the missing attributes you want to be able to read from a concrete event in templates like "recurrence" and "type". Could you open a separate ticket for that?

Let's keep this ticket open, because I believe the agenda ("fetch( 'mugo_calendar', 'events'...)" ) is not correctly resolving concrete events.

@brookinsconsulting
Copy link
Contributor Author

I agree. I opened a new ticket #7

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

2 participants