Bug 41336

Summary: Vue Router warn on Vue datatable pages
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to main --- QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: major    
Priority: P5 - low CC: david, jonathan.druart, matt.blenkinsop, nick, tomascohen
Version: MainKeywords: rel_25_11_candidate
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41328
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Bug Depends on: 41354    
Bug Blocks:    
Attachments: Bug 41336: Remove 'No match found for location with path' warnings
Bug 41336: Fix current (?)
Bug 41336: Remove 'No match found for location with path' warnings
Bug 41336: Fix current (?)
Bug 41336: Remove 'No match found for location with path' warnings
Bug 41336: Fix current (?)
Bug 41336: (follow-up) Fix breadcrumb selector in Cypress test

Description Lucas Gass (lukeg) 2025-12-01 14:06:13 UTC
Vue pages with a dataTable are giving warns like the following:

[Vue Router warn]: No match found for location with path "/cgi-bin/koha/preservation/settings/processings"
Comment 1 Jonathan Druart 2025-12-02 12:34:26 UTC
Created attachment 190077 [details] [review]
Bug 41336: Remove 'No match found for location with path' warnings

Cypress tests for Vue app are currently failing because of the following
warnings in the console:
"[Vue Router warn] No match found for location with path"

It happens for routes that are disabled. We should not build a
router-link but a "disabled" link instead.
Comment 2 Jonathan Druart 2025-12-02 13:18:19 UTC
Created attachment 190079 [details] [review]
Bug 41336: Fix current (?)

On top of "Bug 41354: Fix record sources Vue app" there is still one
failing test for t/cypress/integration/Admin/RecordSources_spec.ts

  1) Breadcrumbs tests
       Breadcrumbs:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it.
      at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11)

This patch is trying to fix it but it does not
Comment 3 David Nind 2025-12-02 20:31:49 UTC
The tests still don't pass for me, even with bug 41354 and 41355 applied first - yarn cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts:

  1) Breadcrumbs tests
       Breadcrumbs:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it.
      at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11)

Testing notes (using KTD):

1. Enable ERM (ERMModule system preference)
2. Turn on the developer tools for your browser
3. Go to the ERM landing page
4. Note these warnings in the console:
   - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eholdings"
   - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eholdings/local"
   - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eusage"
5. Bonus: Test other areas of ERM and modules that use Vue and DataTables, such as preservation.
7. Run the test: yarn cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts
8. Apply the patches.
9. yarn build
10. restart_all
11. Repeat steps 3-7: no warnings, test passes
Comment 4 David Nind 2025-12-02 20:32:30 UTC
It does fix 'No match found for location with path' warnings  8-)
Comment 5 Nick Clemens (kidclamp) 2025-12-03 13:20:54 UTC
Created attachment 190107 [details] [review]
Bug 41336: Remove 'No match found for location with path' warnings

Cypress tests for Vue app are currently failing because of the following
warnings in the console:
"[Vue Router warn] No match found for location with path"

It happens for routes that are disabled. We should not build a
router-link but a "disabled" link instead.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens (kidclamp) 2025-12-03 13:20:57 UTC
Created attachment 190108 [details] [review]
Bug 41336: Fix current (?)

On top of "Bug 41354: Fix record sources Vue app" there is still one
failing test for t/cypress/integration/Admin/RecordSources_spec.ts

  1) Breadcrumbs tests
       Breadcrumbs:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it.
      at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11)

This patch is trying to fix it but it does not

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens (kidclamp) 2025-12-03 13:21:18 UTC
These worked for me, the tests all pass
Comment 8 Tomás Cohen Arazi (tcohen) 2025-12-03 13:44:13 UTC
Created attachment 190112 [details] [review]
Bug 41336: Remove 'No match found for location with path' warnings

Cypress tests for Vue app are currently failing because of the following
warnings in the console:
"[Vue Router warn] No match found for location with path"

It happens for routes that are disabled. We should not build a
router-link but a "disabled" link instead.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi (tcohen) 2025-12-03 13:44:16 UTC
Created attachment 190113 [details] [review]
Bug 41336: Fix current (?)

On top of "Bug 41354: Fix record sources Vue app" there is still one
failing test for t/cypress/integration/Admin/RecordSources_spec.ts

  1) Breadcrumbs tests
       Breadcrumbs:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it.
      at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11)

This patch is trying to fix it but it does not

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi (tcohen) 2025-12-03 13:44:18 UTC
Created attachment 190114 [details] [review]
Bug 41336: (follow-up) Fix breadcrumb selector in Cypress test

The test was looking for .current class but the Vue component
uses aria-current="page" attribute instead.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 11 Lucas Gass (lukeg) 2025-12-03 15:28:51 UTC
Nice work everyone!

Pushed to main for 25.11