| Summary: | ERM breadcrumb link causes page reload | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Pedro Amorim <pedro.amorim> |
| Component: | ERM | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | david, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39320 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes an issue with the breadcrumb links in the ERM module. The ERM landing page with the dashboard now loads correctly. (This is related to bug 39320 - Create a 'landing page' for ERM.)
|
Version(s) released in: | |
| Circulation function: | |||
| Bug Depends on: | 39320 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 41173: Fix ERM breadcrumb causing page reload
Bug 41173: Fix ERM breadcrumb causing page reload Bug 41173: Fix ERM breadcrumb causing page reload Bug 41173: Fix ERM breadcrumb causing page reload Bug 41173: Add a Cypress test |
||
|
Description
Pedro Amorim
2025-11-03 16:20:26 UTC
Created attachment 188983 [details] [review] Bug 41173: Fix ERM breadcrumb causing page reload The main ERM route was missing a 'name' property, causing the navigation store to treat it as an external path (.pl extension). This resulted in breadcrumb links using href instead of router-link, causing unwanted page reloads. To test: 1. Navigate to ERM module 2. Go to any sub-section (Agreements, Licenses, etc.) 3. Click on 'E-resource management' in the breadcrumb => FAIL: Notice the page reloads! 4. Apply the patch 5. Repeat steps 1-3 => SUCCES: Verify the page doesn't reload and navigation works smoothly 6. Sign off :-D Created attachment 188984 [details] [review] Bug 41173: Fix ERM breadcrumb causing page reload The main ERM route was missing a 'name' property, causing the navigation store to treat it as an external path (.pl extension). This resulted in breadcrumb links using href instead of router-link, causing unwanted page reloads. To test: 1. Navigate to ERM module 2. Go to any sub-section (Agreements, Licenses, etc.) 3. Click on 'E-resource management' in the breadcrumb => FAIL: Notice the page reloads! 4. Apply the patch 5. Repeat steps 1-3 => SUCCES: Verify the page doesn't reload and navigation works smoothly 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 189369 [details] [review] Bug 41173: Fix ERM breadcrumb causing page reload The main ERM route was missing a 'name' property, causing the navigation store to treat it as an external path (.pl extension). This resulted in breadcrumb links using href instead of router-link, causing unwanted page reloads. To test: 1. Navigate to ERM module 2. Go to any sub-section (Agreements, Licenses, etc.) 3. Click on 'E-resource management' in the breadcrumb => FAIL: Notice the page reloads! 4. Apply the patch 5. Repeat steps 1-3 => SUCCES: Verify the page doesn't reload and navigation works smoothly 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Updated Tomas' patch to contain only the change relative to ERM home route (minus the tidy changes, now in a patch in bug 39320). I'm assuming for this bug that you need to run a yarn build.
I get this error when I do, and the ERM landing page is blank (normal staff interface header is displayed without any additional ERM module content) - is there anything else you need to do? (The same happens when you just apply bug
39320.)
yarn build
yarn run v1.22.22
$ yarn css:build && yarn js:build && yarn api:bundle
$ gulp css && gulp css --view opac
[02:09:14] Using gulpfile /kohadevbox/koha/gulpfile.js
[02:09:14] Starting 'css'...
[02:09:14] Finished 'css' after 8.93 ms
[02:09:20] Using gulpfile /kohadevbox/koha/gulpfile.js
[02:09:20] Starting 'css'...
[02:09:20] Finished 'css' after 9.78 ms
$ rspack build --mode development
ERROR in ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/ModuleDashboard.vue?vue&type=script&lang=js (../../../../../../../../node_modules/vue-loader/dist/index.js??ruleSet[0]!./koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/ModuleDashboard.vue?vue&type=script&lang=js) 5:0-54
× Module not found: Can't resolve 'vue-draggable-next' in '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard'
╭─[5:33]
3 │ import WidgetPicker from "./WidgetPicker.vue";
4 │ import { $__ } from "@koha-vue/i18n";
5 │ import { VueDraggableNext } from "vue-draggable-next";
· ────────────────────
6 │
7 │ export default {
╰────
Rspack compiled with 1 error in 1.43 s
Rspack compiled successfully in 1.16 s
Rspack compiled successfully in 707 ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sorry David, I think you need to run: yarn install After you apply the bug that blocks this one (bug 39320). (In reply to Pedro Amorim from comment #6) > Sorry David, I think you need to run: > yarn install Just in case, I'd do $ ktd --shell k$ rm -rf node_modules k$ sudo yarn install --modules-dir /kohadevbox/node_modules k$ yarn build (In reply to Tomás Cohen Arazi (tcohen) from comment #7) > (In reply to Pedro Amorim from comment #6) > > Sorry David, I think you need to run: > > yarn install > > Just in case, I'd do > > $ ktd --shell > k$ rm -rf node_modules > k$ sudo yarn install --modules-dir /kohadevbox/node_modules > k$ yarn build Thanks Pedro and Tomás! That solved the problem. Created attachment 189431 [details] [review] Bug 41173: Fix ERM breadcrumb causing page reload The main ERM route was missing a 'name' property, causing the navigation store to treat it as an external path (.pl extension). This resulted in breadcrumb links using href instead of router-link, causing unwanted page reloads. To test: 1. Navigate to ERM module 2. Go to any sub-section (Agreements, Licenses, etc.) 3. Click on 'E-resource management' in the breadcrumb => FAIL: Notice the page reloads! 4. Apply the patch 5. Repeat steps 1-3 => SUCCES: Verify the page doesn't reload and navigation works smoothly 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 189550 [details] [review] Bug 41173: Add a Cypress test Patch from commit b591ca4 (In reply to Jonathan Druart from comment #10) > Created attachment 189550 [details] [review] [review] > Bug 41173: Add a Cypress test > > Patch from commit b591ca4 Matt, can you give me a hand please? I think this test is correct but it's failing using the Cypress UI: clicking on the erm.pl link in the breadcrumb reloads the page(even with the patch applied!) I think we should use node.redirect if defined, instead of node.path (in store/navigation.js) |