Bug 41481 - XML validation error when launching the tag editor for MARC21 fields 006/008
Summary: XML validation error when launching the tag editor for MARC21 fields 006/008
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical
Assignee: Andreas Roussos
QA Contact: David Cook
URL:
Keywords: rel_25_05_candidate, rel_25_11_candidate
: 41606 (view as bug list)
Depends on: 40163
Blocks:
  Show dependency treegraph
 
Reported: 2025-12-18 15:32 UTC by Beda Szukics
Modified: 2026-02-05 23:06 UTC (History)
10 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes an XML validation error ("Can't validate the xml data from (...)/marc21_field_00{6,8}.xml") when using the tag editor for MARC21 fields 006/008. The tag editor now works as expected for these fields.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41481: change K-C.org website URL scheme to https (2.37 KB, patch)
2025-12-29 11:56 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 41481: Change Koha Community website URL scheme to https (2.42 KB, patch)
2025-12-29 16:22 UTC, David Nind
Details | Diff | Splinter Review
Bug 41481: Change Koha Community website URL scheme to https (2.48 KB, patch)
2026-01-14 00:54 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Beda Szukics 2025-12-18 15:32:59 UTC
While adding or editing a record the plug-in go help completing the 008 field pops up with the message:
Can't validate the xml data from /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/de-DE/data/marc21_field_008.xml
Editing the field without the plugin is still possible.
The bug appeared after upgrading to 25.11
Comment 1 David Nind 2025-12-24 00:51:40 UTC
I can confirm that this is happening in the latest main and in 25.11.

The latest maintenance release for Koha 25.05.06 works correctly.

Steps to reproduce (using koha-testing-docker):

1. Go to create a new record (Cataloging > New record > Books, Booklets, Workbooks).
2. Click the 008 field:
   ==> Result: it is populated with values
3. Click the tag editor.
4. The pop-up window for the value builder appears with a browser error:
      Can't validate the xml data from /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
5. Click OK
6. Only the 'Type of Material' form field is shown (when working correctly, there are several other form fields).

Other notes:
1. No JavaScript errors in the developer tools console
2. The plack.log has GET 404 errors when opening the add MARC form, but clicking on the tag editor returns a 200 (a successful response)

172.18.0.1 - - [24/Dec/2025:00:29:51 +0000] "GET errors/404.pl HTTP/1.1" 404 36698 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.18.0.1 - - [24/Dec/2025:00:29:52 +0000] "GET errors/404.pl HTTP/1.1" 404 36698 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
172.18.0.1 - - [24/Dec/2025:00:29:56 +0000] "GET /intranet/cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008.pl&index=tag_008_subfield_00_580082_980589&result= HTTP/1.1" 200 22089 "http://127.0.0.1:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=BKS" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
Comment 2 Andreas Roussos 2025-12-29 11:33:11 UTC
Apparently, the 006 field is affected as well -- if you launch the tag
editor for this field you get a similar browser pop-up containing the
same XML validation error. I've adjusted the Bug Summary accordingly.

`git bisect` points to commit 1873d97c074f2e501094bba603927b1d87e33706
from Bug 40163, where -- among other things -- the URL scheme for the
koha-community.org website was changed from 'http' to 'https' in the
relevant XML files:

$ git show --format=fuller 1873d97c07 --name-only -- ':*marc21*.xml'
commit 1873d97c074f2e501094bba603927b1d87e33706 (HEAD)
Author:     Tomás Cohen Arazi <tomascohen@theke.io>
AuthorDate: Wed Jun 18 11:43:47 2025 -0300
Commit:     Lucas Gass <lucas@bywatersolutions.com>
CommitDate: Tue Sep 23 16:21:29 2025 -0600

    Bug 40163: Fix several http addresses in the code docs

    Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
    Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
    Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
    Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_007.xml
koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml

$ git show --format=fuller 1873d97c07 */marc21_field_00{6,8}.xml
commit 1873d97c074f2e501094bba603927b1d87e33706 (HEAD)
Author:     Tomás Cohen Arazi <tomascohen@theke.io>
AuthorDate: Wed Jun 18 11:43:47 2025 -0300
Commit:     Lucas Gass <lucas@bywatersolutions.com>
CommitDate: Tue Sep 23 16:21:29 2025 -0600

    Bug 40163: Fix several http addresses in the code docs

    Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
    Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
    Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
    Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

diff --git a/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
index f2640f2b6d..7aec5a8a9e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
+++ b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
@@ -2,7 +2,7 @@

 <!DOCTYPE stylesheet>

-<Tagfield tag="006" xmlns="http://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
+<Tagfield tag="006" xmlns="https://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
   <Material id="BKS"><name>Books</name><description></description>
     <Position pos="00"><name>Form of material</name><description></description>
       <Value code="a"><description>Language material</description></Value>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
index 4097f388ad..7340a891f4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
+++ b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
@@ -2,7 +2,7 @@

 <!DOCTYPE stylesheet>

-<Tagfield tag="008" xmlns="http://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
+<Tagfield tag="008" xmlns="https://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
   <Material id="BKS"><name>Books</name><description></description>
     <Position pos="00-05"><name>Date entered on file</name><description>Computer-generated, six-character numeric string that indicates the date the MARC record was created. Recorded in the pattern yymmdd.</description></Position>
     <Position pos="06"><name>Type of date/Publication status</name><description>One-character alphabetic code that indicates the type of dates given in 008/07-10 (Date 1) and 008/11-14 (Date 2). For continuing resources, the code in 008/06 also indicates the publication status.</description>

The actual problem lies not with the URL scheme change per se, but
rather with how the value builder plugins (marc21_field_00{6,8}.pl)
try to validate the relevant XML files against the Schema Definition
file (marc21_field_CF.xsd), the latter containing two references to
the koha-community.org website that still use the 'http' URL scheme:

$ grep -n http koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd
5:<xs:schema xmlns="http://koha-community.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://koha-community.org" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">

Modifying line 5 of the XSD file as follows is enough to make the
browser pop-up go away and the tag editor for fields 006/008 to
function correctly once again:

xmlns="http://koha-community.org"           => xmlns="https://koha-community.org"
targetNamespace="http://koha-community.org" => targetNamespace="https://koha-community.org"
Comment 3 Andreas Roussos 2025-12-29 11:56:00 UTC
Created attachment 190760 [details] [review]
Bug 41481: change K-C.org website URL scheme to https

Since version 25.11.00 (also valid in current main), while
adding or editing a record, launching the plug-in to help
complete the MARC21 006/008 fields results in a browser
pop-up with the message "Can't validate the xml data from
(...)/marc21_field_00{6,8}.xml".

The actual problem lies with how the value builder plugins
(marc21_field_00{6,8}.pl) try to validate the relevant XML
files against the Schema Definition (marc21_field_CF.xsd),
the latter containing two references to the K-C.org website
that still use the 'http' URL scheme.

This patch fixes that.

Test plan:
1) In a MARC21 instance, create a new record by going to:
   Cataloging > New record > Books, Booklets, Workbooks,
   then click inside the 008 field so it becomes populated.
2) Click the Tag editor icon next to field 008. Notice how
   you get a pop-up window in your browser with the error:
   "Can't validate the xml data from (...)/marc21_field_008.xml".
3) Apply this patch.
4) Repeat step 2) -- this time the tag editor should launch
   correctly.
5) For extra credit, repeat the Test plan this time testing
   field 006 -- its tag editor should work without problems
   after applying the patch.
Comment 4 David Nind 2025-12-29 16:22:07 UTC
Created attachment 190762 [details] [review]
Bug 41481: Change Koha Community website URL scheme to https

Since version 25.11.00 (also valid in current main), while
adding or editing a record, launching the plug-in to help
complete the MARC21 006/008 fields results in a browser
pop-up with the message "Can't validate the xml data from
(...)/marc21_field_00{6,8}.xml".

The actual problem lies with how the value builder plugins
(marc21_field_00{6,8}.pl) try to validate the relevant XML
files against the Schema Definition (marc21_field_CF.xsd),
the latter containing two references to the K-C.org website
that still use the 'http' URL scheme.

This patch fixes that.

Test plan:
1) In a MARC21 instance, create a new record by going to:
   Cataloging > New record > Books, Booklets, Workbooks,
   then click inside the 008 field so it becomes populated.
2) Click the Tag editor icon next to field 008. Notice how
   you get a pop-up window in your browser with the error:
   "Can't validate the xml data from (...)/marc21_field_008.xml".
3) Apply this patch.
4) Repeat step 2) -- this time the tag editor should launch
   correctly.
5) For extra credit, repeat the Test plan this time testing
   field 006 -- its tag editor should work without problems
   after applying the patch.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-12-29 16:31:13 UTC
Thanks for creating a fix so quickly Andreas!
Comment 6 Andreas Roussos 2025-12-30 06:33:25 UTC
(In reply to David Nind from comment #5)
> Thanks for creating a fix so quickly Andreas!
A pleasure, as always, David!
Comment 7 David Cook 2026-01-14 00:44:04 UTC
*** Bug 41606 has been marked as a duplicate of this bug. ***
Comment 8 David Cook 2026-01-14 00:53:23 UTC
Ah yes because the xmlns in ./koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml and ./koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml use "https://" and that's why it couldn't validate. 

Ok seems straightforward enough.
Comment 9 David Cook 2026-01-14 00:54:45 UTC
Created attachment 191397 [details] [review]
Bug 41481: Change Koha Community website URL scheme to https

Since version 25.11.00 (also valid in current main), while
adding or editing a record, launching the plug-in to help
complete the MARC21 006/008 fields results in a browser
pop-up with the message "Can't validate the xml data from
(...)/marc21_field_00{6,8}.xml".

The actual problem lies with how the value builder plugins
(marc21_field_00{6,8}.pl) try to validate the relevant XML
files against the Schema Definition (marc21_field_CF.xsd),
the latter containing two references to the K-C.org website
that still use the 'http' URL scheme.

This patch fixes that.

Test plan:
1) In a MARC21 instance, create a new record by going to:
   Cataloging > New record > Books, Booklets, Workbooks,
   then click inside the 008 field so it becomes populated.
2) Click the Tag editor icon next to field 008. Notice how
   you get a pop-up window in your browser with the error:
   "Can't validate the xml data from (...)/marc21_field_008.xml".
3) Apply this patch.
4) Repeat step 2) -- this time the tag editor should launch
   correctly.
5) For extra credit, repeat the Test plan this time testing
   field 006 -- its tag editor should work without problems
   after applying the patch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 10 Doug Kingston 2026-01-15 18:50:35 UTC
We had this problem at EFDSS after upgrading to 25.11.00. Applying the patch (http->https in marc21_field_CF.xsd) fixed the problem.
Comment 11 Lucas Gass (lukeg) 2026-01-16 21:11:17 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 12 Andrii Nugged 2026-01-20 09:56:16 UTC
I had my comment in parent ticket:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40163#c18

and those parent Bug 40163 changes for http to https in 006/007/008 .xml files affects upcoming 25.05 (because already backported in 25.05.x branch) and current v25.11.00-2 versions

I did manual patch for my productions, but this probably needs fast track for 25.11 and not to be forgotten to include in 25.05 before minor release.
Comment 13 mteal 2026-02-04 15:02:00 UTC
We're seeing this error on 25.05.07.
Comment 14 mteal 2026-02-04 15:03:27 UTC
(In reply to mteal from comment #13)
> We're seeing this error on 25.05.07.

Could this fix be backported to 25.05?
Comment 15 Katrin Fischer 2026-02-05 14:10:05 UTC
Just had another report of this, upping severity since it blocks cataloguing.
Comment 16 David Cook 2026-02-05 23:06:40 UTC
Added dependency of bug 40163 to hopefully make the causal link clearer for the RMaints