Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Visit response in case frame is missing

Oliver Günther69dbd39b5781
diff --git a/frontend/src/turbo/setup.ts b/frontend/src/turbo/setup.ts
index 8e12155c7b3..c74cf15cd4a 100644
--- a/frontend/src/turbo/setup.ts
+++ b/frontend/src/turbo/setup.ts
@@ -3,3 +3,10 @@ import * as Turbo from '@hotwired/turbo';
Turbo.session.drive = false;
// Start turbo
Turbo.start();
+
+// Error handling when "Content missing" returned
+document.addEventListener('turbo:frame-missing', (event:CustomEvent) => {
+ const { detail: { response, visit } } = event as { detail:{ response:Response, visit:(url:string) => void } };
+ event.preventDefault();
+ visit(response.url);
+});