Bug 39712

Summary: Query parameters break the manual mappings in vue modules
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aude.charillon, gmcharlt, jonathan.druart, philip.orr
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38010
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39712: Add tests
Bug 39712: Fix links to the manual from VueJS components
Bug 39712: Remove extra '/' from the URL
Bug 39712: Remove warnings
Bug 39712: Add POD
Bug 39712: Add tests
Bug 39712: Fix links to the manual from VueJS components
Bug 39712: Remove extra '/' from the URL
Bug 39712: Remove warnings
Bug 39712: Add POD

Description Matt Blenkinsop 2025-04-23 15:25:28 UTC
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
Comment 1 Aude Charillon 2025-06-20 12:48:03 UTC
Is Documentation the best component for this bug to be in? I'm afraid it's going to get lost among the requests for updates to the Manual. Would it be more relevant to use the Staff interface component?
Comment 2 Jonathan Druart 2025-06-24 10:41:05 UTC
Created attachment 183437 [details] [review]
Bug 39712: Add tests
Comment 3 Jonathan Druart 2025-06-24 10:41:07 UTC
Created attachment 183438 [details] [review]
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.
Comment 4 Jonathan Druart 2025-06-24 10:41:09 UTC
Created attachment 183439 [details] [review]
Bug 39712: Remove extra '/' from the URL
Comment 5 Jonathan Druart 2025-06-24 10:41:11 UTC
Created attachment 183440 [details] [review]
Bug 39712: Remove warnings

[WARN] Use of uninitialized value $view in exists at /kohadevbox/koha/Koha/Manual.pm line 346.
Comment 6 Jonathan Druart 2025-06-24 10:41:13 UTC
Created attachment 183441 [details] [review]
Bug 39712: Add POD
Comment 7 Jonathan Druart 2025-06-24 10:43:00 UTC
(In reply to Aude Charillon from comment #1)
> Is Documentation the best component for this bug to be in? I'm afraid it's
> going to get lost among the requests for updates to the Manual. Would it be
> more relevant to use the Staff interface component?

Bug 19817 was using "Documentation", but happy to change if you think "Staff interface" fits better.
Comment 8 PTFS Europe Sandboxes 2025-06-24 12:26:37 UTC
Created attachment 183447 [details] [review]
Bug 39712: Add tests

Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Comment 9 PTFS Europe Sandboxes 2025-06-24 12:26:39 UTC
Created attachment 183448 [details] [review]
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 <aude.charillon@openfifth.co.uk>
Comment 10 PTFS Europe Sandboxes 2025-06-24 12:26:41 UTC
Created attachment 183449 [details] [review]
Bug 39712: Remove extra '/' from the URL

Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Comment 11 PTFS Europe Sandboxes 2025-06-24 12:26:43 UTC
Created attachment 183450 [details] [review]
Bug 39712: Remove warnings

[WARN] Use of uninitialized value $view in exists at /kohadevbox/koha/Koha/Manual.pm line 346.

Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Comment 12 PTFS Europe Sandboxes 2025-06-24 12:26:45 UTC
Created attachment 183451 [details] [review]
Bug 39712: Add POD

Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Comment 13 Aude Charillon 2025-06-24 12:28:16 UTC
Fixes the issue as originally described - signing off :-)
(Hoping I've done that correctly with the number of patches!)