calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Events from subscribed calendar not showing up in Upcoming widget.

Open C8620 opened this issue 2 years ago • 15 comments

Steps to reproduce

  1. Install the latest calendar app (4.6.0 at time of writing)
  2. Subscribe to a public calendar (e.g. an group event list)
  3. Open dashboard. (This is not reproduceable using app version <4.5.0)

Expected behavior

Events from subscribed calendar is showing up in the list.

Actual behaviour

Only events from non-subscribed calendars are appearing.

Calendar app version

4.6.0 (any version >= 4.5.0)

CalDAV-clients used

Not relevant.

Browser

Microsoft Edge 120, Firefox 120

Client operating system

Windows, Ubuntu, Android

Server operating system

Cloudlinux

Web server

Other

Database engine version

MariaDB

PHP engine version

PHP 8.2

Nextcloud version

27.1.4

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - appointments: 1.15.4
  - bruteforcesettings: 2.7.0
  - calendar: 4.6.0
  - camerarawpreviews: 0.8.4
  - cfg_share_links: 4.2.0
  - checksum: 1.2.2
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.5.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - deck: 1.11.2
  - emlviewer: 1.0.8
  - epubviewer: 1.5.3
  - external: 5.2.1
  - externalportal: 1.2.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_3dmodelviewer: 0.0.12
  - files_downloadactivity: 1.16.0
  - files_external: 1.19.0
  - files_markdown: 2.4.1
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - files_zip: 1.4.0
  - forms: 3.4.3
  - imageconverter: 1.3.5
  - integration_github: 2.0.6
  - integration_youtube: 0.1.5
  - libresign: 7.1.1
  - login_notes: 1.3.1
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - mail: 3.5.0
  - metadata: 0.19.0
  - music: 1.9.1
  - news: 24.0.0
  - notes: 4.9.0
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - occweb: 0.1.1
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - quicknotes: 0.8.10
  - quota_warning: 1.18.0
  - richdocuments: 8.2.3
  - secrets: 1.5.2
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - sharepoint: 1.15.0
  - side_menu: 3.11.2
  - socialsharing_email: 3.0.1
  - spreed: 17.1.3
  - text: 3.8.0
  - theming: 2.2.0
  - theming_customcss: 1.15.0
  - transfer: 0.6.1
  - twofactor_backupcodes: 1.16.0
  - twofactor_nextcloud_notification: 3.8.0
  - twofactor_totp: 9.0.0
  - twofactor_webauthn: 1.3.2
  - updatenotification: 1.17.0
  - video_converter: 1.0.6
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - circles: 27.0.1 (installed 26.0.0)
  - contactsinteraction: 1.8.0 (installed 1.7.0)
  - encryption: 2.15.0
  - firstrunwizard: 2.16.0 (installed 2.16.0)
  - nextcloud_announcements: 1.16.0 (installed 1.15.0)
  - password_policy: 1.17.0 (installed 1.16.0)
  - photos: 2.3.0 (installed 2.2.0)
  - recommendations: 1.6.0 (installed 1.5.0)
  - related_resources: 1.2.0 (installed 1.1.0-alpha1)
  - support: 1.10.0 (installed 1.9.0)
  - survey_client: 1.15.0 (installed 1.14.0)
  - suspicious_login: 5.0.0 (installed 4.4.0)
  - systemtags: 1.17.0 (installed 1.16.0)
  - user_ldap: 1.17.0
  - user_status: 1.7.0 (installed 1.7.0)

Nextcloud configuration

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.1.4.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "en",
        "default_locale": "en_gb",
        "app_install_overwrite": [
            "theming_customcss",
            "checksum",
            "emlviewer",
            "metadata",
            "socialsharing_email",
            "transfer",
            "weather",
            "files_3d",
            "podcast",
            "libresign",
            "files_downloadactivity"
        ],
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "simpleSignUpLink.shown": false,
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": " 465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "music.enable_radio_hls": true,
        "music.podcast_auto_update_interval": 1,
        "remember_login_cookie_lifetime": 1296000,
        "htaccess.RewriteBase": "\/",
        "session_lifetime": 86400,
        "session_keepalive": true,
        "filelocking.enabled": false,
        "appcodechecker": false,
        "enable_previews": false,
        "auto_logout": false,
        "maintenance": false,
        "loglevel": 0,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [
            "guest_app"
        ],
        "connectivity_check_domains": [
            "www.google.cn",
            "one.one.one.one"
        ]
    }
}

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

Server: LiteSpeed Enterprise.

C8620 avatar Dec 13 '23 15:12 C8620

Do you see the changes in the webUI? We've had some reports that the subscription calendars don't work at the moment.

miaulalala avatar Dec 13 '23 16:12 miaulalala

Do you see the changes in the webUI? We've had some reports that the subscription calendars don't work at the moment.

I am not observing significant offset or change in WebUI, or console / internal errors related to calendar, potentially due to not upgrading to NC28?

A lot of apps are not compatible with NC28 so I think I will not be upgrading anytime soon.

After reverting calendar app multiple times, it appears to be a regression / bug introduced from app version 4.5.0, and left unfixed (probably unreported as well) until now.

C8620 avatar Dec 14 '23 10:12 C8620

Following @escoand 's mention of this issue, I wish to make a clarification:

This issue is about subscribed events not showing up along with local events in the Upcoming Events widget in dashboard. And considering downgrading will resolve this issue, this is an issue with the calendar app.

Hope it helps.

C8620 avatar Dec 14 '23 10:12 C8620

Update: NC28 does not resolve this issue.

C8620 avatar Dec 16 '23 00:12 C8620

There seems to be two parts that consists of the bug (but I could be wrong)

In 4.5.0 version of the cal app, commit babc444245f6e6cef2fd1a88773532074c9cad0e introduced codes to lib/Dashboard/CalendarWidget.php that would gracefully handle the recurring events. However, for subscribed events, it seems that subscribed events will trigger the $recurrence === null exception at line 169 and simply gets skipped.

Considering the search options have already confined the events returned to be within this range, it would be almost impossible (unless there are bugs elsewhere) if an recurring event has no occurrence within this period, so I assume one way to mitigate this issue is by changing the continue at line 170 to $recurrence = $calendarEvent['objects'][0].

This works when forcing the application to use the original widget, but seems to be not working on widget V2 for some reason, which is the part I do not get to understand yet.

C8620 avatar Dec 21 '23 18:12 C8620

Following @escoand 's mention of this issue, I wish to make a clarification:

This issue is about subscribed events not showing up along with local events in the Upcoming Events widget in dashboard. And considering downgrading will resolve this issue, this is an issue with the calendar app.

Hope it helps.

This is what I am experiencing as well. How does one revert to an earlier version of Calendar where the problem seems to be located in?

nekton181 avatar Dec 24 '23 17:12 nekton181

How does one revert to an earlier version of Calendar where the problem seems to be located in?

@nekton181 https://github.com/nextcloud/calendar/issues/5563#issuecomment-1834305078

scharmach avatar Jan 19 '24 10:01 scharmach

If you're still on NC27 this will work. https://github.com/nextcloud/calendar/issues/5563

If you've upgraded to NC28 its not so simple. NC28 completely breaks it and modifies your database. The only solution then is to completely revert to NC27 restore your database to a NC27 version and then downgrade to calendar-v4.4.5

snagglewest avatar Feb 15 '24 15:02 snagglewest

When I look in the ajax requests beining made I don't see my subscribe calendar appearing in the list. Could that explain these events missing from the calendar widget?

rikmeijer avatar Feb 21 '24 15:02 rikmeijer

When I look in the ajax requests beining made I don't see my subscribe calendar appearing in the list. Could that explain these events missing from the calendar widget?

are you on 28? If so, there's a bug that's been fixed with 28.0.3, to be released on the 29th:

https://github.com/nextcloud/server/issues/42143

miaulalala avatar Feb 26 '24 15:02 miaulalala

I just installed 28.0.3, but the subscribed calendar events are still not on my dashboard widget :(

rikmeijer avatar Mar 01 '24 11:03 rikmeijer

I just installed 28.0.3, but the subscribed calendar events are still not on my dashboard widget :(

28.0.3 fixed an upstream issue that caused subscribed events not showing up in APIs internal and external, but dashboard widget is originated from a different issue

are you on 28? If so, there's a bug that's been fixed with 28.0.3, to be released on the 29th:

This is very true, and allows the temp fix to be use-able again

C8620 avatar Mar 08 '24 15:03 C8620

@C8620 what are you referring to when speaking about subscribed calendars? A calendar subscription from a HTTP URL that points to an ICS file, a shared calendar or an invite to an event? I'm asking because the widget doesn't support subscriptions. It never has. I checked Nextcloud 27 and v4.4.5 of the app. In that version, the widget only listed user calendars.

Could you export one of the affected events so I can reproduce the bug easier? Thanks

ChristophWurst avatar Mar 15 '24 14:03 ChristophWurst

The upcoming widget is showing events from subscriptions (e.g. https://www.feiertage-deutschland.de/kalender-download/ics/feiertage-deutschland.ics and also our integrated holiday calendars) with Nextcloud 27 and Calendar v4.4.5.

Screenshot from 2024-03-25 22-14-32

Screenshot from 2024-03-25 22-14-45

The relevant change was https://github.com/nextcloud/calendar/pull/5449. Instead of iterating over the principals calenders, there is only one XHR request for the new api.

kesselb avatar Mar 25 '24 21:03 kesselb

I assume it will be ported to 28.0.X as well?

Mat-DB avatar Mar 26 '24 08:03 Mat-DB

Thanks for your bug report :+1:

I've worked on two patches, which are also scheduled for the upcoming releases of Nextcloud 28 (2024-05-23) and Nextcloud 29 (2024-05-23), to address some issues regarding the upcoming events widget.

  1. Bring back events from subscribed calendars: https://github.com/nextcloud/server/pull/44752

  2. Fix an issue with reoccurrence: https://github.com/nextcloud/server/pull/45222

I hope, but cannot say for sure, if those patches already enough. Please log a fresh issue if your issue is still there with Nextcloud 28.0.6 or Nextcloud 29.0.0.1.

It's often helpful to let us know if the problem exists with your personal calendar, a shared calendar (by you or to you), or a calendar subscription. Moreover, exporting an ICS file is often helpful.

Thank you and stay tuned!

kesselb avatar May 07 '24 20:05 kesselb