Jump to content

Recommended Posts

Posted

We have just upgraded to 4.5 today and first bug encountered is in calendar sidebar widget.

It's showing events in wrong order (unlike before). AM events should appear before PM events.

Support acknowledge and reported the bug with indefinite timeline.

We need urgent help please with some coding tweak or patch, as we have many events every week and this confusion will irritate our members.

calendar bug.JPG

Posted

Have you asked for the changes from support? My guess would be that the fix is in application/calendar/sources/Event/Event.php in the sorting that happens in the retrieveEvents function, however that's a total and complete guess. 🙂

Posted

Yes I did asked support but they cant provide any assistance for their own bug and we have to wait indefinitely. Sad but true.

Thanks for pointing in at least 1 file out of 20K files.

I'm happy to pay, if someone can fix this 1 bug, please PM me.

Posted
27 minutes ago, Gauravk said:

Thanks for pointing in at least 1 file

Funnily enough, as it is a Widget in the Calendar app, and it's the "Upcoming events", there is an obvious file to look at as a starting point...

application\calendar\widgets\upcomingEvents.php

And in there, the following line gets the list of events:

$events = \IPS\calendar\Event::retrieveEvents( $_today, $endDate, ( $calendars === NULL ? NULL : !\is_array( $calendars ) ? array( $calendars ) : $calendars ), $count, FALSE )

Which directs you to applications\calendar\sources\Event\Event.php, where the retrieveEvents function lives. And it contains 264 lines of code (or more, or less, depends on your IDE and settings) to look through. And that takes more time to do...and would require it to be sent to the developers, not the front-line support guys, to work on and will take them away from already existing work they are doing on v4.6.

If I have the time later, then I'll look through that code but NO promises at all being given here.

35 minutes ago, CoffeeCake said:

Why you gotta be that way, guys? @Jordan Invision

 

Don't set a precedent.

Posted

Thanks @Nathan Explosion for saving me tons of hassle as I'm not a coder but I was about to jump on that file to do some roulette luck or hacking out of sheer desperation.

After reading your 264 line of codes, I would rather pray or pay until someone helps.

Posted (edited)

 

@Gauravk remove that direct edit of the widget file, and use this plugin instead.

EDIT: updated plugin to force the usort to only run when the upcomingEvents widget is the item calling the function

 

(NE) Re-sort Upcoming Events widget_1.0.1.xml

Edited by Nathan Explosion
updated plugin to force the usort to only run when the widget is used
  • 2 weeks later...
Posted

I know one thing. When I set the scan for seven hundred days instead of seven in the upcoming events widget, all those pages where this widget stood began to load for a very long time. And because of this I swore the technical support of the hosting. 😆

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...