Support » Plugin: Private Google Calendars » Sort calendars in filter

  • Resolved aezzell2020

    (@aezzell2020)


    I currently have 3 calendars attached to a Google Workspace account, and they are all displaying correctly (as far as I’ve tested). There aren’t a lot of events yet, but the ones I have created as showing up the way I expect them to.

    https://new.phoenixuu.org/connect/calendar/

    In the PGC admin interface, they are listed in alphabetical order after my main calendar:

    Children’s Ministry
    Drummunity
    Outdoor Group

    And in the Gutenberg block settings when I am editing the page, they are also listed alphabetically where I can check which ones to include in the calendar display.

    But in the filter at the bottom of the list, they are listed as:
    Druummunity, Outdoor Group, Children’s Ministry

    That’s the order in which they were created.

    Is there some way to list them alphabetically in the filter? That’s going to make the most sense to the viewers of the calendar.

    I tried revoking access and reauthorizing; that didn’t change anything.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author michielve

    (@michielve)

    That’s a good one. I’ll release a new version of the plugin with the calendars sorted alphabetically (together with the changed enqueue name from your previous topic) somewhere this week.

    Plugin Author michielve

    (@michielve)

    FYI: version 20211101 has been released, so this should be fixed.

    Thread Starter aezzell2020

    (@aezzell2020)

    Unfortunately, that didn’t fix the sorting in the filter, although it did fix the conflict with the theme.

    https://new.phoenixuu.org/connect/calendar/

    I cleared the plugin data, revoked access, and re-authorized – but the calendars in the filter are still not displaying in alphabetical order.

    The files on the server are all showing today’s date & time. When I compare the first version of the plugin to the new one, I see that there’s code to sort the calendars by summary in pgc.js:

          // Sort calendars by summary
          var sortedCalendarIds = Object.keys(calendars);
          sortedCalendarIds.sort(function (a, b) {
            return calendars[b].summary.localeCompare(calendars[b].summary);
          });
          sortedCalendarIds.forEach(function (key, index) {

    But it doesn’t seem to be working unless I have some kind of major caching issue going on (always a possibility, I realize).

    Plugin Author michielve

    (@michielve)

    Sorry there was a mistake in the code, this is now fixed in version 20211103.

    Thread Starter aezzell2020

    (@aezzell2020)

    YES!!!

    It’s working now.

    Thank you for getting this fixed so quickly 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sort calendars in filter’ is closed to new replies.