[Bug 16111] New: RSS feed for OPAC search results has wrong content type

classic Classic list List threaded Threaded
57 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 16111] New: RSS feed for OPAC search results has wrong content type

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

            Bug ID: 16111
           Summary: RSS feed for OPAC search results has wrong content
                    type
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: OPAC
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

As a result of (ancient) commit f6e1214c, OPAC search result RSS feeds come
over with the content type text/html. It should be at least text/xml, and with
the demise of Internet Explorer 6, arguably application/rss+xml.

The cause: prior to that commit, setting the CGI parameter format to rss2
resulted in passing "rss" as the content type parameter to
output_with_http_headers; after that commit, rss2 was no longer properly
recognized when setting that parameter.

The main user-visible consequence is that clicking on the RSS link in Chrome
(when no feed-reader plugin is installed) renders the feed as HTML rather than
XML.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

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

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff
   Patch complexity|---                         |Small patch

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #1 from Owen Leonard <[hidden email]> ---
Created attachment 49400
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49400&action=edit
Bug 16111 - 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.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #2 from Galen Charlton <[hidden email]> ---
Comment on attachment 49400
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49400
Bug 16111 - RSS feed for OPAC search results has wrong content type

Review of attachment 49400:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16111&attachment=49400)
-----------------------------------------------------------------

::: opac/opac-search.pl
@@ +733,4 @@
>          }
>  
>          ## If there's just one result, redirect to the detail page
> +        if ($total == 1 && $format ne 'rss' && $format ne 'opensearchdescription' ) {

I've no objection to switching to 'rss', but 'rss2' ought to continue to be
recognized as a format specifier; otherwise, we'll break existing feed
subscriptions.

Quick addition to do this would be along the lines of

my $format = $cgi->param("format") || '';
$format = 'rss' if $format =~ /rss/;

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

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

--- Comment #3 from Owen Leonard <[hidden email]> ---
Created attachment 49587
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49587&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.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Magnus Enger <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Needs Signoff               |Failed QA

--- Comment #4 from Magnus Enger <[hidden email]> ---
Testing in Firefox 45.0. Without the patch:

- Do a search
- Click on the RSS icon
- Verify the response has a text/html content type

With the patch:

- Do the same search
- Click on the RSS icon
- The response is now text/xml. Good!
- But: Boom, Firefox shows this error:

XML Parsing Error: no element found
Location:
http://kohadev/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2
Line Number 10, Column 1:

And the response from the server is just 10 blank lines, no content at all.

For added weirdness: Chromium displays the RSS seemingly OK after applying the
patch.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Magnus Enger <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--- Comment #5 from Magnus Enger <[hidden email]> ---
Please disregard comment #4, I was not testing with English as the chosen
language. Guess I am a bit rusty...

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Magnus Enger <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Magnus Enger <[hidden email]> changed:

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

--- Comment #6 from Magnus Enger <[hidden email]> ---
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 <[hidden email]>
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #7 from Jonathan Druart <[hidden email]> ---
Would not it better to fix the atom feeds instead of removing it?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #8 from Owen Leonard <[hidden email]> ---
(In reply to Jonathan Druart from comment #7)
> Would not it better to fix the atom feeds instead of removing it?

Making the atom feed work would really be a new feature, since as far as I can
tell they were never actually implemented.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #9 from Jonathan Druart <[hidden email]> ---
Created attachment 49837
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49837&action=edit
Bug 16111: POC

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #10 from Jonathan Druart <[hidden email]> ---
(In reply to Owen Leonard from comment #8)
> (In reply to Jonathan Druart from comment #7)
> > Would not it better to fix the atom feeds instead of removing it?
>
> Making the atom feed work would really be a new feature, since as far as I
> can tell they were never actually implemented.

Not sure about that, looking at this POC, it seems that it has been broken by
the move to Template::Toolkit

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Signed Off                  |In Discussion

--- Comment #11 from Marcel de Rooy <[hidden email]> ---
This report needs further clarification.
What is the exact purpose of the POC patch?
Do we want to get rid of (unfinished?) atom format or on the other hand add
support for it?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #12 from Jonathan Druart <[hidden email]> ---
The purpose of the POC is to prove it could be fixed quickly.
I think the atom feeds have worked before but have been broken when migrating
to TT.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #13 from Nick Clemens <[hidden email]> ---
Would it be reasonable to fix the RSS here and then move the atom
discussion/fix/removal to another bug report so this one can get through?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Christopher Brannon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #14 from Christopher Brannon <[hidden email]> ---
(In reply to Nick Clemens from comment #13)
> Would it be reasonable to fix the RSS here and then move the atom
> discussion/fix/removal to another bug report so this one can get through?

Yes!  Sounds like the Atom feed is something that should be addressed in
another bug.  I'm all for moving this along.

Christopher

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Marjorie Barry-Vila <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marjorie.barry-vila@collect
                   |                            |o.ca

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|In Discussion               |Patch doesn't apply

--- Comment #15 from Katrin Fischer <[hidden email]> ---
Do we need to decide here if we want to support ATOM or RSS as a standard?

We have had reports about the RSS feed not working and I'd like to help get
things moving here again. Patches currently don't apply.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Patch doesn't apply         |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Owen Leonard <[hidden email]> changed:

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

--- Comment #16 from Owen Leonard <[hidden email]> ---
Created attachment 76148
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76148&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 <[hidden email]>
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #17 from Jonathan Druart <[hidden email]> ---
I am sorry but we are doing something very wrong here.
The POC patch shows that it is very easy to support atom, whereas the "Revised"
patch is removing all this code.

I would suggest to:
1. Fix the content type for rss
2. Fix the rss2 vs rss and keep support for rss2
3. Add the support for atom

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

Jonathan Druart <[hidden email]> changed:

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

--- Comment #18 from Jonathan Druart <[hidden email]> ---
Created attachment 76160
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76160&action=edit
Bug 16111: Fix content type for RSS feed

Test plan:
GET
http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2

=> Without this patch it returns content type text/html
=> With this patch it returns text/xml

GET
http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss
=> Without this patch it does not work
=> With this patch it returns text/xml

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #19 from Jonathan Druart <[hidden email]> ---
Created attachment 76161
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76161&action=edit
Bug 16111: Fix atom support

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111

--- Comment #20 from Jonathan Druart <[hidden email]> ---
Created attachment 76162
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76162&action=edit
Bug 16111: Remove 'rss2' which should be 'rss' or 'atom'

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
12