From 2ec52503c1ebb39462cfcda43f7589b3fa498dac 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 --- .../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 90ea09d696f..de3603fe0c5 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 @@ -171,23 +171,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 %] @@ -199,89 +192,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.43.0