Bug 28750

Summary: Undefined subroutines in svc/cataloguing/framework (caused by bug 17600)
Product: Koha Reporter: Nick Clemens <nick>
Component: CatalogingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: david, jonathan.druart, kyle, m.de.rooy
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes an issue in master caused by bug 17600. This resulted in the advanced cataloguing editor failing to load.
Version(s) released in:
21.11.00
Bug Depends on: 17600    
Bug Blocks:    
Attachments: Bug 28750: (bug 17600 follow-up) Use full path for subroutines
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib
Bug 28750: fix svc/bib_framework
Bug 28750: (bug 17600 follow-up) Use full path for subroutines
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib
Bug 28750: fix svc/bib_framework

Description Nick Clemens 2021-07-23 13:53:04 UTC
http://localhost:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_framework::GetMarcStructure called at /kohadevbox/koha/svc/cataloguing/framework line 18
Comment 1 Nick Clemens 2021-07-23 13:55:53 UTC
Created attachment 123118 [details] [review]
Bug 28750: (bug 17600 follow-up) Use full path for subroutines

Throughout the file we call methods with the module
Following suit rather than importing the methods

To test:
1 - Attempt to load advanced cataloging editor
2 - it fails
3 - http://localhost:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
4 - Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_framework::GetMarcStructure called at /kohadevbox/koha/svc/cataloguing/framework line 18
5 - Apply patch
6 - Cataloging editor loads!
7 - Link in #3 loads!
Comment 2 Jonathan Druart 2021-07-23 13:59:18 UTC
I think there are all the svc scripts that need to be double checked. I can do it on Monday if nobody beats me to it.
Comment 3 Nick Clemens 2021-07-23 14:24:10 UTC
Created attachment 123121 [details] [review]
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib

To test:
1 - Attempt to save a record in the advanced cataloging editor
2 - It fails
3 - Apply patch
4 - It succeeds
Comment 4 Nick Clemens 2021-07-23 14:35:04 UTC
Created attachment 123124 [details] [review]
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib

To test:
1 - Attempt to save a record in the advanced cataloging editor
2 - It fails
3 - Apply patch
4 - It succeeds
Comment 5 Nick Clemens 2021-07-23 16:29:50 UTC
Created attachment 123144 [details] [review]
Bug 28750: fix svc/bib_framework
Comment 6 David Nind 2021-07-23 21:20:48 UTC
Created attachment 123154 [details] [review]
Bug 28750: (bug 17600 follow-up) Use full path for subroutines

Throughout the file we call methods with the module
Following suit rather than importing the methods

To test:
1 - Attempt to load advanced cataloging editor
2 - it fails
3 - http://localhost:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
4 - Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_framework::GetMarcStructure called at /kohadevbox/koha/svc/cataloguing/framework line 18
5 - Apply patch
6 - Cataloging editor loads!
7 - Link in #3 loads!

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2021-07-23 21:20:56 UTC
Created attachment 123155 [details] [review]
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib

To test:
1 - Attempt to save a record in the advanced cataloging editor
2 - It fails
3 - Apply patch
4 - It succeeds

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2021-07-23 21:21:04 UTC
Created attachment 123156 [details] [review]
Bug 28750: fix svc/bib_framework

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2021-07-23 21:32:27 UTC
Testing notes (koha-testing-docker)
- Before applying patches:
  . can edit and save a record using the default editor (for example, edit title for a book - where BKS framework used)
  . can't edit using advanced editor: sits on screen with icon going around "Loading..."
  . result from accessing URL in step 3 is error in step 4 of test plan
- After applying patches:
  . advanced editor loads!
  . any edits using the normal or advanced editor complain about missing 003 field (didn't before the patch, even though was mandatory before and doesn't display by default)
  . page with framework data loads for URL in step 3
  . can edit and save records using the advanced editor (and normal editor)
Comment 10 Jonathan Druart 2021-07-26 14:45:08 UTC
Pushed to master for 21.11, thanks to everybody involved!