Bugzilla – Attachment 97854 Details for
Bug 23407
XSLT Details pages don't use items, we shouldn't pass them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23407: Don't process items for XSLT on details pages
Bug-23407-Dont-process-items-for-XSLT-on-details-p.patch (text/plain), 1.87 KB, created by
Marcel de Rooy
on 2020-01-24 07:25:22 UTC
(
hide
)
Description:
Bug 23407: Don't process items for XSLT on details pages
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-24 07:25:22 UTC
Size:
1.87 KB
patch
obsolete
>From 71ff0a1a7ea69ca0426eb8174f4ad5aec0e58acd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 31 Jul 2019 20:14:34 +0000 >Subject: [PATCH] Bug 23407: Don't process items for XSLT on details pages >Content-Type: text/plain; charset=utf-8 > >To test: >1 - Add 1000 items to a record > Go to biblio > Edit items > Add multiple copies of this item > Add 1000 and confirm > Wait.. >2 - Load the record in staff client and OPAC, note how long it takes > Press F12 in browser to open the console > use the Network tab of the console > note the load time > refresh a few times to see average time >3 - Apply patch >4 - Restart all the things >5 - Reload the record in staff and opac >6 - Note decresed time >7 - Verify nothing on the page has changed > >QA can grep the standard XSLT files for details pages for 'item' to note occurences do not use items information > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/XSLT.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 173d4e0da7..37023cda40 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -242,7 +242,12 @@ sub XSLTParse4Display { > > # grab the XML, run it through our stylesheet, push it out to the browser > my $record = transformMARCXML4XSLT($biblionumber, $orig_record); >- my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); >+ my $itemsxml; >+ if ( $xslsyspref eq "OPACXSLTDetailsDisplay" || $xslsyspref eq "XSLTDetailsDisplay" || $xslsyspref eq "XSLTResultsDisplay" ) { >+ $itemsxml = ""; #We don't use XSLT for items display on these pages >+ } else { >+ $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); >+ } > my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); > > $variables ||= {}; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23407
:
91900
|
91916
|
92045
|
97850
| 97854 |
97855
|
97856