From bc47867f2006295c6d3635c2a75b167a416a1a2e Mon Sep 17 00:00:00 2001 From: moreamazingnick Date: Tue, 8 Oct 2024 09:25:02 +0200 Subject: [PATCH] Fix PluginOutputHookImplementation gets called twice #5271 (#5272) --- doc/80-Upgrading.md | 6 ++++++ .../application/views/scripts/show/components/output.phtml | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/80-Upgrading.md b/doc/80-Upgrading.md index c6f4b7b57..c313fb485 100644 --- a/doc/80-Upgrading.md +++ b/doc/80-Upgrading.md @@ -3,6 +3,12 @@ Specific version upgrades are described below. Please note that upgrades are incremental. An upgrade from v2.6 to v2.8 requires to follow the instructions for v2.7 too. +## Upgrading to Icinga Web 2.12.2 + +**Framework changes affecting third-party code** + +* `Icinga\Module\Monitoring\Hook\PluginOutputHook` When rendering the Icinga check output, the output and long_output fields are now concatenated with a newline (\n) before any post-processing occurs, such as through a PluginOutputHook + ## Upgrading to Icinga Web 2.12.0 **Database Schema** diff --git a/modules/monitoring/application/views/scripts/show/components/output.phtml b/modules/monitoring/application/views/scripts/show/components/output.phtml index 34d82689b..9d9f8147e 100644 --- a/modules/monitoring/application/views/scripts/show/components/output.phtml +++ b/modules/monitoring/application/views/scripts/show/components/output.phtml @@ -1,5 +1,4 @@

translate('Plugin Output') ?>

- pluginOutput($object->output, false, $object->check_command) ?> - pluginOutput($object->long_output, false, $object->check_command) ?> + pluginOutput($object->output . "\n" . $object->long_output, false, $object->check_command) ?>