Bug 29199

Summary: Classes in item availability on OPAC results no longer set correctly
Product: Koha Reporter: Lucas Gass <lucas>
Component: OPACAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, kyle, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on:    
Bug Blocks: 28831    
Attachments: Bug 29199: fix bad class names
Bug 29199: fix bad class names
Bug 29199: Fix parameters of ListCallNumbers
Bug 29199: Fix parameters of ListCallNumbers
Bug 29199: Fix parameters of ListCallNumbers

Description Lucas Gass 2021-10-08 19:55:11 UTC
In MARC21slim2OPACResults.xsl there are 2 class that are rendered like this:

$class_block
$class_status

I'm pretty sure those are invalid HTML class names. I also suspect this was a typo.
Comment 1 Lucas Gass 2021-10-08 20:09:15 UTC
Created attachment 125985 [details] [review]
Bug 29199: fix bad class names

Go to OPAC results page and inscept the page.
See the class names inside ItemSummary with class names containing a $
Apply patch, restart things
Class names are the same but without the leading $
Comment 2 David Nind 2021-10-08 21:37:47 UTC
Created attachment 125988 [details] [review]
Bug 29199: fix bad class names

Go to OPAC results page and inscept the page.
See the class names inside ItemSummary with class names containing a $
Apply patch, restart things
Class names are the same but without the leading $

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-10-10 10:51:54 UTC
I am not sure this patch is correct. The idea here seems to have been that the XSLT variables should have been replaced by different values depending on context. This patch just makes them static. We should have a deeper look.
Comment 4 Katrin Fischer 2021-10-10 11:10:32 UTC
I checked against an older version, and this class names should probably contain things like ItemBranch, CallNumberAndLabel. So I've ruled out a typo here, definitely needs more investigation.
Comment 5 Marcel de Rooy 2021-10-11 08:46:24 UTC
Created attachment 126030 [details] [review]
Bug 29199: Fix parameters of ListCallNumbers

[1] ItemBranch should have been passed with quotes.
[2] You cannot use $x as class name, you need to use xsl:attribute.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2021-10-11 08:48:05 UTC
Lucas or David, please have a look again.
Comment 7 Lucas Gass 2021-10-12 21:38:35 UTC
Created attachment 126132 [details] [review]
Bug 29199: Fix parameters of ListCallNumbers

[1] ItemBranch should have been passed with quotes.
[2] You cannot use $x as class name, you need to use xsl:attribute.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Lucas Gass 2021-10-12 21:39:14 UTC
(In reply to Marcel de Rooy from comment #6)
> Lucas or David, please have a look again.

Thanks for the patch Marcel!
Comment 9 Nick Clemens 2021-10-15 13:53:35 UTC
Created attachment 126327 [details] [review]
Bug 29199: Fix parameters of ListCallNumbers

[1] ItemBranch should have been passed with quotes.
[2] You cannot use $x as class name, you need to use xsl:attribute.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2021-10-15 13:57:49 UTC
Pushed (inadvertently) to master for 21.11.00
Comment 11 Marcel de Rooy 2021-10-15 14:00:41 UTC
(In reply to Jonathan Druart from comment #10)
> Pushed (inadvertently) to master for 21.11.00

?
Comment 12 Jonathan Druart 2021-10-15 14:21:21 UTC
(In reply to Marcel de Rooy from comment #11)
> (In reply to Jonathan Druart from comment #10)
> > Pushed (inadvertently) to master for 21.11.00
> 
> ?

It was signed off when I pushed it, I forgot to remove from my branch (applied on cascade after I applied bug 28831).