refinery / refinerycms-news

News Plugin for Refinery CMS
http://www.refinerycms.com
MIT License
121 stars 120 forks source link

Archive is incorrect #93

Closed dekom closed 11 years ago

dekom commented 12 years ago

Refinery::News:Items#archive does not retrieve correct entries.

It calls Refinery::News::Item.live, which calls Refinery::News::Item.not_expired, which results in no record retrieved. I simply removed the call for .live in the controller, though that would also retrieve unpublished entries.

byropig commented 12 years ago

Also - I noticed an error in the ItemsHelper. In the news_item_archive_link method, the else part reads post_date = post.publish_date.strftime('01/%Y'), which breaks my site as it is unable to find "post". I changed this to read post_date = item.publish_date.strftime('01/%Y') locally - and this seems to fix the error.

Not sure if this was supposed to be it's own issue - but it is kind of linked to the archive section of this engine, or rather extension.

parndt commented 12 years ago

cc @ugisozols @gogogarrett