If the framework used by an MARC record does not have fields defined which were imported (e.g. imported 852$9, but BKS does not have that defined), the missing information generates a '--' as part of the OPAC description in 'MARC view', but separated from data to be displayed which is defined. This is in part due to the choice of || 0, instead of calculating the tab based on the tag (e.g. 852 => tab 8). Additionally, this || 0 part happens in part because of a variable being undef, which causes some noisiness in the logs. So any undef potentially setting code related to $sf_def will be made less noisy.
This bug deals with the opac-MARCdetail noisiness that was found while trying to clean up OPAC noise in bug 11183.
Created attachment 22915 [details] [review] Bug 11242 - fix opac-MARCdetail.pl display and warnings BACK UP YOUR DATABASE! 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page 7) Edit -> record 8) Note the framework used. 9) More -> Administration 10) MARC bibliographic frameworks 11) Click 'MARC structure' for the framework used by the item shown in OPAC. 12) Find the tag (e.g. 260 or 942) and click 'Subfields' 13) Delete of the matching subfields shown in the OPAC tab
Created attachment 22916 [details] [review] Bug 11242 - fix opac-MARCdetail.pl display and warnings BACK UP YOUR DATABASE! 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page 7) Edit -> record 8) Note the framework used. 9) More -> Administration 10) MARC bibliographic frameworks 11) Click 'MARC structure' for the framework used by the item shown in OPAC. 12) Find the tag (e.g. 260 or 942) and click 'Subfields' 13) Delete of the matching subfields (e.g. 260$b) shown in the OPAC tab 14) Refresh OPAC tab. The tag subfields are split. 15) Apply patch 16) Refresh OPAC tab. The tag subfields are no longer split strangely.
Created attachment 22922 [details] [review] Bug 11242 - fix opac-MARCdetail.pl display and warnings BACK UP YOUR DATABASE! 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the staff client URL similar to: /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page where ##### is the biblionumber. 7) Edit -> record 8) Note the framework used. 9) More -> Administration 10) MARC bibliographic frameworks 11) Click 'MARC structure' for the framework used by the item shown in OPAC. 12) Find the tag (e.g. 260 or 942) and click 'Subfields' 13) Delete of the matching subfields (e.g. 260$b) shown in the OPAC tab 14) Clear your opac error log. 15) Refresh OPAC tab. The tag subfields are split. 16) There are opac-MARCdetail.pl warnings. 17) Apply patch 18) Clear your opac error log. 19) Refresh OPAC tab. The tag subfields are no longer split strangely. 20) There are no opac-MARCdetail.pl warnings. RESTORE YOUR DATABASE. This also silences a series of warnings triggered by catching undef hash references.
Created attachment 22969 [details] [review] [SIGNED-OFF] Bug 11242 - fix opac-MARCdetail.pl display and warnings BACK UP YOUR DATABASE! 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the staff client URL similar to: /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page where ##### is the biblionumber. 7) Edit -> record 8) Note the framework used. 9) More -> Administration 10) MARC bibliographic frameworks 11) Click 'MARC structure' for the framework used by the item shown in OPAC. 12) Find the tag (e.g. 260 or 942) and click 'Subfields' 13) Delete of the matching subfields (e.g. 260$b) shown in the OPAC tab 14) Clear your opac error log. 15) Refresh OPAC tab. The tag subfields are split. 16) There are opac-MARCdetail.pl warnings. 17) Apply patch 18) Clear your opac error log. 19) Refresh OPAC tab. The tag subfields are no longer split strangely. 20) There are no opac-MARCdetail.pl warnings. RESTORE YOUR DATABASE. This also silences a series of warnings triggered by catching undef hash references. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Not sure to reproduce correctly the issue: - choose a biblio, edit and add a value in 686$a - delete the subfield 686$a in the framework - go at the OPAC (marc view), I get: 686 ## - classification -- existe pas 101 ## - Langue langue doc. Français I apply the patch, I get: 101 ## - Langue langue doc. Français 686 ## - classification -- existe pas I certainly miss something...
Created attachment 23071 [details] Screenshots of my tests. I have attached a zip file of 5 screen shots. Framework_Before.jpg - display showing a, b, and c subfields for 260. Framework_After.jpg - display showing that 'b' was deleted. OPAC_BeforeBreak.jpg - initial OPAC display (only 1 260 block displayed) OPAC_AfterBreak.jpg - display after 'b' is deleted (2 260 blocks displayed). OPAC_AfterPatch.jpg - display after patch is applied (1 260 block displayed). This 'deleting' of 260$b, would be the same if one changed the framework to not include something which is in the MARC for that record.
Created attachment 23100 [details] [review] Bug 11242 - fix opac-MARCdetail.pl display and warnings BACK UP YOUR DATABASE! 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the staff client URL similar to: /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page where ##### is the biblionumber. 7) Edit -> record 8) Note the framework used. 9) More -> Administration 10) MARC bibliographic frameworks 11) Click 'MARC structure' for the framework used by the item shown in OPAC. 12) Find the tag (e.g. 260 or 942) and click 'Subfields' 13) Delete of the matching subfields (e.g. 260$b) shown in the OPAC tab 14) Clear your opac error log. 15) Refresh OPAC tab. The tag subfields are split. 16) There are opac-MARCdetail.pl warnings. 17) Apply patch 18) Clear your opac error log. 19) Refresh OPAC tab. The tag subfields are no longer split strangely. 20) There are no opac-MARCdetail.pl warnings. RESTORE YOUR DATABASE. This also silences a series of warnings triggered by catching undef hash references. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master. Thanks, Mark!
This patch has been pushed to 3.14.x, will be in 3.14.1
This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Mark!