Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl
Summary: Invalid HTML generated by MARC21slim2OPACResults.xsl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 16:27 UTC by Owen Leonard
Modified: 2015-06-04 23:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl (1.65 KB, patch)
2014-10-21 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl (1.79 KB, patch)
2014-10-25 10:04 UTC, Frédéric Demians
Details | Diff | Splinter Review
[PASSED QA] Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl (1.99 KB, patch)
2014-10-25 10:27 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-10-21 16:27:45 UTC
MARC21slim2OPACResults.xsl, which controls XSLT output of search results in the OPAC, applies a non-unique "id" attribute to each row of results. This is invalid HTML. A class should be used instead.
Comment 1 Owen Leonard 2014-10-21 18:11:14 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2014-10-25 10:04:18 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-25 10:27:32 UTC
Created attachment 32714 [details] [review]
[PASSED QA] Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl

This patch converts an id to a class in order to avoid duplicate id
attributes on one page.

To test you must have XSLT enabled with the default setting. Perform a
search in the OPAC and confirm that the display of location looks
correct.

Run the resulting page through a validator using an in-browser tool like
Firefox's Html Validator addon or using the W3C's validator.w3.org. The
results should not complain of duplicate id attributes.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

OK for me. Obvious mistake: I can confirm FF HTML validator reports it, and
stop reporting it after applying this patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can confirm this fix is correct.
Also, I found that jQuery doesn't like repeated ids in some cases
so this will make customizing easier.
Comment 4 Tomás Cohen Arazi 2014-10-27 15:30:53 UTC
Patch pushed to master.

Thanks Owen!