Urgent: event sorting in list view not working properly

Home Forums Calendar Products Community Events Urgent: event sorting in list view not working properly

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #948715
    Markus
    Participant

    My calendar’s list view doesn’t sort events properly (i.e. by start date/time). Instead, some events show up on top even though there are others happening sooner (which are listed below). When I don’t enter search criteria but simply hit on “filter events” the sorting is corrected: the first event to take place shows up first and what was first before is now sorted in row.
    Here’s the page to look at: http://www.weltladen-akademie.de/termine/kategorie/oeffentlich/
    You can see an event on March 26 being listed before the one on March 20.
    I have disabled all other plugins and it might be a conflict with UltimateMember, which I use for access control on the site.
    I need to urgently fix this – my client is waiting for it. Can somebody please help me?

    #948850
    Barry
    Member

    Hi Markus,

    I’m sorry to hear you are experiencing difficulties.

    Just to confirm, is this the plugin you are referring to? If so, I’m not sure I can replicate the problem (though perhaps very specific settings need to be in place).

    Is the problem definitely cleared up when you deactivate Ultimte Member? Could switching to a different plugin with similar membership capabilities offer a way forward here?

    #948861
    Markus
    Participant

    hi Barry,
    yes, that’s the one. Unfortunately switching over is not an option now. This one is way better than a row of others I have tested.
    With UM activated the listing of events is as follows:
    March (heading)
    March 20
    March 21
    March 28
    June (heading)
    June 19-20
    March (heading)
    March 26
    October (heading)
    October 2
    November (heading)
    November 20
    January 2016 (heading)
    January 15
    February (heading)
    Feb 26
    April (heading)
    April 22
    September (heading)
    Sept 9

    So it is somehow listed chronologically – just that one event on March 26 is late. Or, if you will, the June event is listed to early. It used to be like this with another event we had created for testing as well. When I deleted that one and re-entered it again manually, it worked. I have of course tried that trick here as well, but to no avail. Deleting and manually recreating the event doesn’t help.
    Whenever I click on “find events” (without entering anything in the searchbar) the sorting is corrected. But when I reload the page, it is incorrect again.
    There is no setting in UM which looks like it could potentially affect the calendar. I can even disable the loading of the UM’s js and css files on a particular page. Doesn’t help.
    Also my assumption it might have to do with a two-day-event was wrong. When I changed June 19-20 to June 19, the listing didn’t change.

    When I disable the plugin and reload the page, the sorting is correct: first March 26, then June 19-20.

    I don’t mind giving you access to the dashboard, if that can help. Let me know.

    #948892
    Barry
    Member

    Hi Markus,

    So following a recent change to our terms and conditions I’m afraid we cannot generally accept login credentials to your site, but thanks for offering.

    I do see the problem on your site, certainly, I just meant I could not replicate locally when I performed a quick test πŸ™

    Integration issues with third party components are generally something we need to leave in your hands — though there are times we are happy to explore such issues, realistically, it has to be a plugin with a significant amount of traction amongst our users: in the case of this particular plugin, I’m not sure that is applicable so it may be best to approach the author (of UltimateMembers) for further assistance.

    It may be for instance they can pinpoint a specific section of their code that modifies the main query (and if so, they can probably give you code to test temporaily unhooking it, to further help track down the source of the problem).

    Is that viable here? If nothing else, if you can work with them to figure out a snippet to stop this problem we can probably help you to make it only apply to event pages πŸ™‚

    #949381
    Markus
    Participant

    I’ve contacted Ultimate Member. But what I don’t understand is: when I hit “find events”, the sorting is being corrected. So obviously there’s a difference in the default query and the one issued by the “find events” button. What’s that difference? If it works with hitting the button, can’t the regular query be modified in the same way?

    #949422
    Barry
    Member

    When the view is loaded initially WordPress will run its main query as usual (and in this case it will of course look for events rather than blog posts).

    My guess is that this other plugin interferes with and changes the query whenever it detects that it is the main query (and there is only ever one “main query” in any request).

    When you hit Find Events, though, the work happens via an ajax request. Effectively the same query – or something very similar – still runs but it isn’t “labelled” as the main query – and so perhaps Ultimate Member decides not to interfere with it for that reason.

    If it works with hitting the button, can’t the regular query be modified in the same way?

    We’d really need to twist things to make that happen and it probably wouldn’t be a particularly efficient or maintainable way to approach this problem.

    The way it looks, the problem is that the other plugin is modifying a query that it has no business changing – and if that’s correct, the best way to tackle this is to stop it from doing so.

    #949429
    Markus
    Participant

    Ok, that sounds reasonable indeed. One more thing: could the problem be related to the fact that this is not the “entire” calendar but just one category of events added as a menu item? If so, could there be a workaround?

    #949460
    Barry
    Member

    That’s possible, too, though it sounds like the issue still stems from another plugin modifying the query (and only on the initial load, not when it is updated via ajax).

    #953441
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Urgent: event sorting in list view not working properly’ is closed to new replies.