Bug 8708 - RSS feed for new comments is broken
Summary: RSS feed for new comments is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-31 13:02 UTC by Owen Leonard
Modified: 2013-12-05 19:59 UTC (History)
5 users (show)

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


Attachments
Bug 8708 - RSS feed for new comments is broken (1.37 KB, patch)
2012-08-31 13:12 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8708 - RSS feed for new comments is broken (1.46 KB, patch)
2012-08-31 14:13 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 8708 [Revised] RSS feed for new comments is broken (1.55 KB, patch)
2012-09-05 16:51 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8708 [Revised] RSS feed for new comments is broken (1.58 KB, patch)
2012-09-05 19:54 UTC, Nicole C. Engard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-08-31 13:02:02 UTC
Adding the KohaDates plugin to the recent comments template also added some whitespace at the beginning of the file. This breaks XML processing.
Comment 1 Owen Leonard 2012-08-31 13:12:13 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2012-08-31 13:41:04 UTC
Hi Owen,
I have not tested this patch. But if it just removes boundary characters, I think a comment is welcomed.
Indeed if a stubborn of alignment and indentation (like me !) read that in the future, he would certainly re-add them :)
Comment 3 Owen Leonard 2012-08-31 13:53:22 UTC
Sorry Jonathan, but I'm confused. Are you asking for more information?
Comment 4 Magnus Enger 2012-08-31 13:55:37 UTC
Maybe a TT-comment that says "Make sure there are no spaces/newlines here, it will ruin the XML processing"? And use [%- and -%] to remove whitespace introduced by the comment?
Comment 5 Jonathan Druart 2012-08-31 14:01:55 UTC
(In reply to comment #4)
> Maybe a TT-comment that says "Make sure there are no spaces/newlines here,
> it will ruin the XML processing"? And use [%- and -%] to remove whitespace
> introduced by the comment?

It is exactly what I meant, thanks Magnus :)
Comment 6 Nicole C. Engard 2012-08-31 14:13:19 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2012-09-05 16:51:21 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2012-09-05 19:54:58 UTC
Created attachment 11991 [details] [review]
[SIGNED-OFF] Bug 8708 [Revised] RSS feed for new comments is broken

Removing white space from the beginning of the file
so that XML processing will work correctly.

Before the patch, viewing the page
(/cgi-bin/koha/opac-showreviews.pl?format=rss) in a browser
which supports RSS handling (ex: Firefox)  will show you
unformatted and broken-looking text. After the patch the
page will trigger the browser's built-in RSS-handling format.

Revision: Template now includes comment pointing out that the <xml>
declaration must not have any white space before it.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 9 Jonathan Druart 2012-09-06 07:45:27 UTC
Thank you Owen.
Marked as Passed QA.
Comment 10 Paul Poulain 2012-09-12 13:32:32 UTC
Patch pushed to master
(Not sure this patch applies or is relevant for 3.8)
Comment 11 Chris Cormack 2012-09-12 20:35:40 UTC
Pushed to 3.8.x will be in 3.8.5