From 42b7c4e0314096b8396b7e3216741283797d04b6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 18 Dec 2025 13:37:20 +0100 Subject: [PATCH] Bug 41476: Fix plugins table when one of the plugin has errors I've tried to install one of my old plugin and it exploded. https://gitlab.com/joubu/koha-plugin-jump Test plan: Install a broken plugin and notice the Datatable error on the plugins list With this patch applied the error is gone Signed-off-by: Emmi Takkinen --- .../prog/en/modules/plugins/plugins-home.tt | 161 +++++++++--------- 1 file changed, 79 insertions(+), 82 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 028c15b6f7..282ed28786 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -172,23 +172,16 @@ [% FOREACH plugin IN plugins %] - [% IF plugin.error %] - - + + + [% UNLESS plugin.error %] + [% plugin.metadata.name | html %] + [% ELSE %] [% plugin.name | html %] ERRORS - - [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] - Error found whilst attempting to load plugin - [% ELSE %] - Error found whilst attempting to load plugin [% END %] - - [% ELSE %] - - - [% plugin.metadata.name | html %] - + + [% UNLESS plugin.error %] [% plugin.metadata.description | html %] @@ -200,89 +193,93 @@
Warning: This plugin was written for an older version of Koha. Use at your own risk.
[% END %] - [% plugin.metadata.author | html %] - [% plugin.metadata.version | html %] - [% plugin.metadata.minimum_version | html %] - [% plugin.metadata.maximum_version | html %] - [% plugin.metadata.date_updated | $KohaDates %] + [% ELSE %] - [% IF ( plugin.is_enabled ) %] - Enabled - [% ELSE %] - Disabled - [% END %] + Error found whilst attempting to load plugin - [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] - -
- Actions - +
+ + [% END %] + [% END %] -- 2.34.1