From 1021099cd075efcebbdd4f3f8eb72cc0555fb7e7 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Thu, 28 May 2026 11:55:21 +0300 Subject: [PATCH 1/2] If we're trying to view a remote event, we shouldn't pollute the logs (view_video.php). For example, we were viewing an event, but the page in the browser wasn't closed, and in the meantime, the recorded event was deleted. In this case, there will be a persistent error in the logs. --- web/views/view_video.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/views/view_video.php b/web/views/view_video.php index ea825e2a330..cabc13c3350 100644 --- a/web/views/view_video.php +++ b/web/views/view_video.php @@ -83,7 +83,7 @@ } if ( ! ($fh = @fopen($path, 'rb') ) ) { - ZM\Error('Can\'t open video at '.$path); + ZM\Debug('Can\'t open video at '.$path); header('HTTP/1.0 404 Not Found'); die(); } From 2c5be4fd98ce369803ef99b649fd5168a74ec264 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sun, 31 May 2026 17:41:59 +0300 Subject: [PATCH 2/2] - Added the "eventNotFound" JS constant for the Event page. - If a recorded event isn't found (eventNotFound == true), then print a message to the browser console and stop further script processing, as this is pointless, but it will help avoid unnecessary warnings and errors. --- web/skins/classic/views/js/event.js | 4 ++++ web/skins/classic/views/js/event.js.php | 1 + 2 files changed, 5 insertions(+) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index 2af682c7753..3aeb1df0048 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -1359,6 +1359,10 @@ function onStatsResize(vidWidth) { } function initPage() { + if (eventNotFound) { + console.log("Event was not found."); + return; + } getAvailableTags(); getSelectedTags(); diff --git a/web/skins/classic/views/js/event.js.php b/web/skins/classic/views/js/event.js.php index f6de301b058..624eb5c6401 100644 --- a/web/skins/classic/views/js/event.js.php +++ b/web/skins/classic/views/js/event.js.php @@ -17,6 +17,7 @@ // PHP variables to JS // var connKey = ''; +const eventNotFound = Id() || ($Event->Id() and !file_exists($Event->Path()))) ? "true" : "false") ?>; var eventData = { Id() ) { ?>