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

fix: error handling for exceptions for recurrence next #5483

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Sep 19, 2023

Companion for nextcloud/server#40301

Handle exceptions that may happen when resolving recurrence next to an actual recurrence id.

Before After
image image

How to test

  • You need an invalid object id and recurrence next to trigger the state.
  • Have the activity app
  • Create an event
  • Patch apps/dav/lib/CalDAV/Activity/Provider/Event.php with the patch below
  • Open activity
  • Click on calendar event
  • Without the patch: Endless loading animation

Patch

Index: apps/dav/lib/CalDAV/Activity/Provider/Event.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php	(revision 2bd0f07e5a1bb1a83ec3b1c86c1a1271dcdad9e3)
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php	(date 1695136734933)
@@ -97,7 +97,7 @@
 				// The calendar app needs to be manually loaded for the routes to be loaded
 				OC_App::loadApp('calendar');
 				$linkData = $eventData['link'];
-				$objectId = base64_encode($this->url->getWebroot() . '/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
+				$objectId = base64_encode('blub' . '/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
 				$link = [
 					'view' => 'dayGridMonth',
 					'timeRange' => 'now',

@kesselb kesselb self-assigned this Sep 19, 2023
@kesselb kesselb added the 3. to review Waiting for reviews label Sep 19, 2023
@kesselb kesselb added this to the v4.6.0 milestone Sep 19, 2023
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02% ⚠️

Comparison is base (4d3172f) 22.61% compared to head (cc02049) 22.59%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5483      +/-   ##
============================================
- Coverage     22.61%   22.59%   -0.02%     
  Complexity      395      395              
============================================
  Files           241      241              
  Lines         11848    11854       +6     
  Branches       2306     2306              
============================================
  Hits           2679     2679              
- Misses         9169     9175       +6     
Flag Coverage Δ
javascript 13.81% <0.00%> (-0.01%) ⬇️
php 64.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/mixins/EditorMixin.js 3.47% <0.00%> (-0.07%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter is unhappy

Handle exceptions that may happen when resolving recurrence next to an actual recurrence id.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the bug/noid/error-handling-recurrence-next branch from ca4fc4d to cc02049 Compare September 19, 2023 17:35
@st3iny st3iny merged commit ea4bb63 into main Sep 19, 2023
38 of 40 checks passed
@st3iny st3iny deleted the bug/noid/error-handling-recurrence-next branch September 19, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants