News plugin - reload forever on the second click

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

Plugin

news

Steps to Reproduce

Hi Angus,

I notice that news plugin works on the fisrt load and appear properly, but when i click on the link the second time, it loads but nothing appears.

Let me know your thoughts.

Best,

Example

Logs

21
ArgumentError (invalid value for Integer(): “”) /var/www/discourse/plugins/discourse-news/gems/2.6.2/gems/rss-0.2.8/lib/rss/rss.rb:743:in Integer' 6:34 am 21 Failed to handle exception in exception app middleware : invalid value for Integer(): "" 6:34 am ActionView::Template::Error (undefined methodname’ for nil:NilClass) /var/www/discourse/app/views/list/list.rss.erb:20:in block in _app_views_list_list_rss_erb__3530303745904891089_70103031056800' 6:40 am 5 Excon::Error::MovedPermanently (Expected(200) <=> Actual(301 Moved Permanently) ) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/excon-0.64.0/lib/excon/middlewares/expects.rb:13:inresponse_call’
6:50 am
5
Uncaught TypeError: this.model.loadMore is not a function Url: https://francais-a-londres.org/assets/application-a45fc6c444721552170f8b0e49243e360fb46e04fd84bf56ada4fde26b8e9153.js Line: 30 Column: 82
7:23 am
2
ActionView::Template::Error (undefined method name' for nil:NilClass) /var/www/discourse/app/views/list/list.rss.erb:20:inblock in _app_views_list_list_rss_erb___816014626149276603_70042654150400’
7:26 am
ActionView::Template::Error (undefined method name' for nil:NilClass) /var/www/discourse/app/views/list/list.rss.erb:20:inblock in _app_views_list_list_rss_erb___816014626149276603_70042654214920’
7:42 am
21
Uncaught [object Object] Url: https://francais-a-londres.org/assets/ember_jquery-0ae86c6a7527a99c2b9b8a11521273bd9cb4f7d41bc546df081b7ee94f26d9c3.js Line: 9 Column: 6919 Window Location: https://franc
7:54 am

@jeremielondon Thanks for this report. I’ve just pushed a fix for this.

This work is part of this project: News Plugin v0.2

1 Like