From d4cdbc9bb054058bcb96e2f6cf8adbc4cae3a75c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Jun 2025 12:29:49 +0200 Subject: [PATCH] Bug 39712: Fix links to the manual from VueJS components Query parameters break the manual mappings in vue modules. If a url in a vue module contains query parameters the mapping for the manual fails and redirects to the homepage when 'Help' is clicked To reproduce navigate to the agreements page in ERM and create at least one. On the list page, use the filters so that you have query parameters in the page URL. Click the 'Help' button - you just get the manual home page Test plan: Confirm that the original issue is fixed when this patch is applied. Signed-off-by: Aude Charillon --- Koha/Manual.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Manual.pm b/Koha/Manual.pm index fe5cc2c5b3..b96ca1012d 100644 --- a/Koha/Manual.pm +++ b/Koha/Manual.pm @@ -318,9 +318,9 @@ sub get_url { my ( $url, $preferred_language ) = @_; my $file; if ( $url =~ /koha\/(.*)\.pl/ - || $url =~ '/koha/(erm.*)' - || $url =~ '/koha/(preservation.*)' - || $url =~ '/koha/(acquisition/vendors.*)' ) + || $url =~ '/koha/(erm[^?]*)' + || $url =~ '/koha/(preservation[^?]*)' + || $url =~ '/koha/(acquisition/vendors[^?]*)' ) { $file = $1; } else { -- 2.39.5