boston-library / commonwealth-vlr-engine

Commonwealth-VLR-Engine is a Rails engine for creating Blacklight apps that provide access to content from Solr/Fedora, packaging a number of feature-rich enhancements and modifications.
Apache License 2.0
8 stars 2 forks source link

PagesHelperBehavior#render_blog_feed doesn't return blog posts #142

Closed ebenenglish closed 1 month ago

ebenenglish commented 2 months ago

There are potentially two errors:

  1. Incorrect blog URL (fixed in https://github.com/boston-library/Commonwealth-public-interface/commit/5af96dd735409c100dd16adace347deb34ffb953)
  2. render_blog_feed needs fixing

If problem is not solved by #1 above, try updating method like so:

if source.present?
  feed = Rails.cache.fetch('dc_rss_feed', expires_in: 60.minutes) do
    uri = URI.parse(source)
    RSS::Parser.parse(uri.open.read, false).items[0..3]
  end
end