[Bug 17527] New: 245 $h Medium - hidden settings in MARC framework don' t work correctly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Bug ID: 17527 Summary: 245 $h Medium - hidden settings in MARC framework don't work correctly Change sponsored?: --- Product: Koha Version: 3.22 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Bibliographic data support Assignee: gmcharlt@gmail.com Reporter: eb@efdss.org QA Contact: testopia@bugs.koha-community.org 245 $h will not be hidden. Even when this subfield is set to "ignore", it still shows up in the staff interface and the OPAC. However, the 245$h does not appear in the MARC view. Just checked and setting other subfields in other fields to "ignore" seems to work as expected. I haven't tested them all, but it consistently doesn't work in 245 This applies to 3.22 and 16.05 (MARC 21) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57014&action=edit Bug 17527: Hide hidden fields for XSLT blocks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org Version|3.22 |unspecified CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |tomascohen@gmail.com Status|NEW |In Discussion Depends on| |11592 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Here is a patch for discussion. Tomas, could you confirm this is the way to go? Why don't we have a lower level subroutine/method to retrieve a filtered record? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11592 [Bug 11592] opac detail scripts do not respect MARC tag visibility -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Elaine Bradtke from comment #0)
This applies to 3.22 and 16.05 (MARC 21)
Do you mean it worked before 3.22? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Irma Birchall <irma@calyx.net.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |irma@calyx.net.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|normal |enhancement --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- To my knowledge it never worked for the XSLT/normal views, the hidden values only take effect on the MARC views. There is a patch from Mark that might add this feature in 16.11: Bug 15870 - Add Filter for MARC to respect visibility settings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ah sorry, 16.05! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm got curious about this one, that's what happens for me: If I uncheck the visibility for 245$h for the OPAC it works for me immediately on the OPAC detail view, but not in the result list. It's still visible there after reindexing too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 57014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57014 Bug 17527: Hide hidden fields for XSLT blocks Review of attachment 57014: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17527&attachment=57014) ----------------------------------------------------------------- ::: C4/Search.pm @@ +2222,4 @@
# XSLT processing of some stuff # we fetched the sysprefs already before the loop through all retrieved record! if (!$scan && $xslfile) { + $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $interface);
It's the simplest change, but I really dislike that many parameters. ::: C4/XSLT.pm @@ +255,1 @@
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items);
Technically, 952 visibility could be checked/unchecked accordingly, so there might be something necessary here. ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ +347,4 @@
[% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] +/ Details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</i>
What reason is there for adding this slash? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Katrin Fischer from comment #4)
To my knowledge it never worked for the XSLT/normal views, the hidden values only take effect on the MARC views.
That is my understanding too. And it looks like Jonathan has adapted the filter for use against the XSLT views. I'm thinking this patch might be the way forward for XSLT currently. Though, see my comment about items in comment #7. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Also, templates. The template files are using parameters passed directly which may have grabbed the unfiltered values. I'd like to see a refactor of templates, but that is not necessary to solve this problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #7)
Comment on attachment 57014 [details] [review] Bug 17527: Hide hidden fields for XSLT blocks
Review of attachment 57014 [details] [review]: -----------------------------------------------------------------
::: C4/Search.pm @@ +2222,4 @@
# XSLT processing of some stuff # we fetched the sysprefs already before the loop through all retrieved record! if (!$scan && $xslfile) { + $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $interface);
It's the simplest change, but I really dislike that many parameters.
Me too, that's why I spend half of my time refactoring legacy code.
::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ +347,4 @@
[% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] +/ Details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</i>
What reason is there for adding this slash?
Just a typo maybe? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Elaine Bradtke <eb@efdss.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eb@efdss.org --- Comment #11 from Elaine Bradtke <eb@efdss.org> --- (In reply to Jonathan Druart from comment #3)
(In reply to Elaine Bradtke from comment #0)
This applies to 3.22 and 16.05 (MARC 21)
Do you mean it worked before 3.22?
I don't know if it worked before 3.22. I have two different systems, one running 3.22 and the other running 16.05 and it doesn't work in either of them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Elaine Bradtke from comment #11)
(In reply to Jonathan Druart from comment #3)
(In reply to Elaine Bradtke from comment #0)
This applies to 3.22 and 16.05 (MARC 21)
Do you mean it worked before 3.22?
I don't know if it worked before 3.22. I have two different systems, one running 3.22 and the other running 16.05 and it doesn't work in either of them.
Proper application of the MARC framework visibility settings has been broken for quite a while. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- If there is no objection, I would like to test this for the reported problem 245$h and sign off. Granted, there will be further visibility issues as raised by comment #7, with respect to item information, but this should solve a large group of visibility issues with XSLT. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #13)
If there is no objection, I would like to test this for the reported problem 245$h and sign off. Granted, there will be further visibility issues as raised by comment #7, with respect to item information, but this should solve a large group of visibility issues with XSLT.
Go for it, but check for possible double-filtering on the controller scripts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Tomás Cohen Arazi from comment #14)
Go for it, but check for possible double-filtering on the controller scripts.
Because of the templates, I am guessing there may be. And yep, double filtering. Why? Because of the way the template works. An ugly if can fix that up... *cringe* Patch incoming. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #15)
(In reply to Tomás Cohen Arazi from comment #14)
Go for it, but check for possible double-filtering on the controller scripts.
Because of the templates, I am guessing there may be. And yep, double filtering. Why? Because of the way the template works. An ugly if can fix that up... *cringe* Patch incoming.
no, I mean because the records get filtered in the controller scripts by calling Koha::RecordProcessor, and then filtered again for XSLTParse4Display -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 57217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57217&action=edit Bug 17527: Avoid double filtering and floody log clean up Because the filtering filters parameter values, C4/Output was triggering floody output. During testing, everything was set to hidden=-8. While this is not realistic, it did uncover some floodiness which may have already existed with the non-XSLT output. OPAC did have a double filtering call, because of the poor design of the template. An if condition around the processor call prevents that, while still allowing the template to work. TEST PLAN --------- 0) Back up your DB 1) in marc_subfield_structure, set all hidden=-8 -- this makes everything hidden everywhere. -- it is completely arbitrary, any value which hides in OPAC would suffice for this patch. 2) in the staff client, make sure the OPACXSLTDetailsDisplay system preference is 'default' or some custome template -- default was used for testing. 3) make sure at least one book is entered in the system -- my testing assumes 1 -- testing data set only had book with 'carbs' in title. 4) search for 'carbs' in the OPAC -- because I only had 1 match it redirected to results. -- material type 'book' comes from LDR, which is not filtered. -- the items section is built and not part of the filter. -- should be painfully sparse 5) select the three views -- all should be painfully sparse 6) select 'view plain' in the MARC view tab. -- painfully sparse 7) run koha qa test tools NOTE: This patch only needs testing in OPAC. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- The problem with XSLT is the processing a record vs. displaying it. The staff client does some strange things with this when you attempt to add a biblio from Z39.50 and then an item when all the frameworks settings have hidden=-8. Strangely, the data makes it in. I would have preferred that one could not even add anything. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #19 from M. Tompsett <mtompset@hotmail.com> --- In short, it works as expected, but there are some strange side effects. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to M. Tompsett from comment #19)
In short, it works as expected, but there are some strange side effects.
What are the strange side effects? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #21 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Katrin Fischer from comment #20)
What are the strange side effects?
See comment #18 -- describes steps into strangeness "The staff client does some strange things with this when you attempt to add a biblio from Z39.50 and then an item when all the frameworks settings have hidden=-8." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #22 from M. Tompsett <mtompset@hotmail.com> --- Changed to needs sign off, because I'm pretty sure it solved the issues mentioned on bug 11592 after it was pushed to master. And 'In Discussion' is a wasteland. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #22)
And 'In Discussion' is a wasteland.
Sometimes used as an euphemism (nice alias) for Failed QA ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #24 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marcel de Rooy from comment #23)
(In reply to M. Tompsett from comment #22)
And 'In Discussion' is a wasteland.
Sometimes used as an euphemism (nice alias) for Failed QA ?
Sometimes, yes. Which explains what the Failed QA (255) and In Discussion (219) queues are roughly the same. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA Summary|245 $h Medium - hidden |Hidden settings in MARC |settings in MARC framework |framework don't work |don't work correctly |correctly on results list --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi, I tested this, but can't get it to work on the results lists: - Applied patches - Removed accidental / ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ +347,4 @@
[% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] +/ Details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</i>
- restart_all in kohadevbox - Set 245$b and 245$p to 'hidden in OPAC' in the frameworks - Checked the result list - subfields still display - Checked the detail page - subfields are hidden (same without patches) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #26 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Katrin Fischer from comment #25)
- restart_all in kohadevbox - Set 245$b and 245$p to 'hidden in OPAC' in the frameworks - Checked the result list - subfields still display - Checked the detail page - subfields are hidden (same without patches)
There are lots of places in OPAC related code where it grabs the subtitle, etc. directly from a bibliorecord, rather than the filtered MARC record. BTW, this *might* improve with bugs 19040 and 14385. I make no promises. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #27 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
There are lots of places in OPAC related code where it grabs the subtitle, etc. directly from a bibliorecord, rather than the filtered MARC record.
BTW, this *might* improve with bugs 19040 and 14385. I make no promises.
I don't think this applies to the XSLT built result list. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Marc, could you take another look? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #29 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- This bug is quite important I think. In my opinion, it should focus on XSLT generated HTML, in order to continue integration. The case of subtitle : [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] It should be another bug. Or we consider that setting a subtitle means it is to show it at intranet and OPAC. Its like trying to hide author ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |koha-bugs@lists.koha-commun |ommunity.org |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master Status|Failed QA |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57014|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57217|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm taking over this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |DUPLICATE --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Starting fresh on bug 24458, as this one covered things that are already fixed in master. *** This bug has been marked as a duplicate of bug 24458 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org