-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add paging to RSS results #366
base: 7.x
Are you sure you want to change the base?
Conversation
Looks like the links produced here aren't working because at some point in the process (after Any suggestions for overcoming the encoded ampersand problem? |
You should probably use |
@jonathangreen I'm not sure that applies here... This is what I get from
I've fixed the link problem -- of course I realized these should have been |
Crap, never mind - it's still escaping. I'm sort of at a loss here.. |
@jonathangreen OK, all is well. Apparently you can add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see the URL building and handling of page arguments to be done in a more drupaly way here instead of using the PHP variables and string concatenation.
@jonathangreen OK, I finally understood what you were talking about... got the 'page' parameter from |
@jonathangreen Still not sure I can do anything about the |
@jonathangreen I think everything works now! Any further items for the review? |
@jonathangreen Added two more needed pieces: no "next" link if there is no next page, and remove the "page" attribute for the "previous" link if the previous page is the first page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is coming along. I'd like to see none of the links use $base_url
and all use the url
function.
I'm also wondering if there should be code here thats setting the variable for paging that maybe wasn't checked in.
All right! I had to learn a lot to make this work, but it's sorted out... All of your comments are addressed, @jonathangreen, I think. |
Anything left, @jonathangreen? |
Off the top of my head I see a few debugging statements left there. Sorry its been a really busy week for me, but I'm going to try to take another pass at this next week. |
Ack, you're right. I'm too impatient with my pushes! Those have been removed, thanks. |
Pinging @jonathangreen Anything left or is this good to go? |
So I think the code looks okay, but I don't think it's a valid RSS document anymore, which is probably a bad thing. RFC-5005 has some details about adding pagination to RSS: I think it's probably reasonable to follow their suggestions about using the atom namespace for pagination. I think we should also have an option to return all results, perhaps setting the RSS page limit to 0. In that case we should follow their suggestion of not displaying these extra links. Another issue I noticed while testing this is that the |
@DiegoPino do you have any comments on how to do the pagination for RSS? I think you had mentioned you did at the last committers call. |
@jonathangreen i referenced the same document you just did https://tools.ietf.org/html/rfc5005#section-3, there is nothing that says rss/rss2 does not allow it but yes, all examples are for the Atom namespaces. |
I feel like the RSS examples from the RFC using the atom namespace within RSS make sense to me: <?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:fh="http://purl.org/syndication/history/1.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.example.net/</link>
<description>Liftoff to Space Exploration.</description>
<lastBuildDate>Fri, 30 May 2003 11:06:42 GMT</lastBuildDate>
<fh:archive/>
<atom:link rel="current"
href="http://liftoff.example.net/index.rss"/>
<atom:link rel="prev-archive"
href="http://liftoff.example.net/2003/04/index.rss"/>
<item>
<title>Upcoming Eclipse</title>
<link>http://liftoff.example.net/2003/05/30/eclipse</link>
<description>Sky watchers in Europe, Asia, and parts of
Alaska and Canada will experience a partial eclipse of the Sun
on Saturday, May 31st.</description>
<pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
<guid>http://liftoff.example.net/2003/05/30/eclipse</guid>
</item>
<item>
<title>The Engine That Does More</title>
<link>http://liftoff.example.net/2003/05/27/vasmir</link>
<description>Before man travels to Mars, NASA hopes to
design new engines that will let us fly through the Solar
System more quickly. The proposed VASIMR engine would do
that.</description>
<pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
<guid>http://liftoff.example.net/2003/05/27/vasmir</guid>
</item>
</channel>
</rss> |
@jonathangreen If I move the link from 'value' into 'attributes->href', I end up encoding all of the parameters. Adding That is...
gets me Any idea if it's possible to get rid of the |
|
Yes, so that's the problem... this is supposed to be a link, and |
I'm going to dismiss my review and step back from this one and let someone with RSS experience review it. I don't think we should be emitting invalid XML with |
@Islandora/7-x-1-x-committers with more RSS knowledge then I can review this one.
@jonathangreen Looking at the Example RSS from the WC3 XML 2.0 Specs a link can have a |
JIRA Ticket: (https://jira.duraspace.org/browse/ISLANDORA-2439)
What does this Pull Request do?
Adds paging to Solr RSS results.
What's new?
Adds additional
<link>
elements in the<channel>
element that provide the next, previous, and first pages.How should this be tested?
<channel>
sectionInterested parties
@Islandora/7-x-1-x-committers