[Koha-bugs] [Bug 16111] RSS feed for OPAC search results has wrong content type

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 29 13:53:30 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Magnus Enger <magnus at libriotech.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49587|0                           |1
        is obsolete|                            |

--- Comment #6 from Magnus Enger <magnus at libriotech.no> ---
Created attachment 49629
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49629&action=edit
Bug 16111 [Revised] RSS feed for OPAC search results has wrong content type

This patch fixing handling of OPAC search results feeds by correcting
parameters passed to the script and making format checks consistent in
the script.

This patch also removes altogether references to a separate "atom"
formatted feed, because the template for that feed displays no content
(and never has).

To test, apply the patch and perform a search in the OPAC.

- Click the RSS link and confirm that the browser displays a feed with
  no errors. In Chrome the feed should display a "document tree" view.
- Using the browser's developer console, verify that the content-type of
  the document is defined as "text/xml."
- Validate the resulting feed at https://validator.w3.org/feed/ and
  confirm that it is valid.

Revision adds suggestion from QA to accept the old 'rss2' parameter and
treat it like an 'rss' parameter. Also changed: Corrected another place
where 'rss2' was used in the template.

Signed-off-by: Magnus Enger <magnus at librietech.no>
Before the patch:
- RSS is served with content-type text/html
- The link from the RSS icon ona search page looks like
  opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2

After applying the patch:
- RSS is served as text/xml
- The RSS link leads to
  opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss
  But the old link with format=rss2 still works

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list