/wiki/vermont page broken
Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!
The problem
This page: https://publiclab.org/wiki/vermont is broken!
I believe this is due to this server error, related to the notes: powertag: see the error on line 57 here, in Tag.find_popular_notes --
Completed 500 Internal Server Error in 5097.5ms
ActionView::Template::Error (wrong argument type Symbol (expected Module)):
54:
55: <% if @node.has_power_tag('notes') %>
56: <% tagname = @node.power_tag('notes') %>
57: <% @nodes = Tag.find_popular_notes(tagname,20,4) %>
58: <% if @nodes.length > 0 %>
59: <%= render :partial => "notes/tagged_notes", :locals => {:nodes => @nodes} %>
60: <p><a href="/tag/<%= tagname %>">More "<%= tagname %>" research »</a></p>
app/models/tag.rb:113:in `find_popular_notes'
app/views/wiki/show.html.erb:57:in `_app_views_wiki_show_html_erb__2271202724578249590_69910634652980'
Solution
We could:
- add at test for
Tag.find_popular_notes()in the unit tests, here: https://github.com/publiclab/plots2/blob/master/test/unit/tag_test.rb - look at the original code for reference and ensure we're passing the right data types in: https://github.com/publiclab/plots2/blob/master/app/models/tag.rb#L108
- fix the line in the template and open a PR to see the test we'd created pass, to confirm we've fixed it! Template here: https://github.com/publiclab/plots2/blob/master/app/views/wiki/show.html.erb#L57
Steps to Fix
- [ ] claim this issue with a comment here, below, and ask any clarifying questions you need
- [ ] set up a repository locally following the README instructions, and make sure that all tests pass
- [ ] try to fix the issue following the steps above, but even before you're done, you can:
- [ ] commit your changes and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
- [ ] alert someone via the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!
Please email the developers list (see https://publiclab.org/wiki/developers) or go to the chatroom if you have questions, and take a look at our first-timers landing page for more information!
@Fastie did you see this issue?
I noticed that the page was gone a few weeks ago. I tried not to take it personally, and assumed that it might appear again eventually.
I think we could reproduce this issue by introducing a test using the notes:_____ tag as described here: https://publiclab.org/wiki/power-tags#List+of+power+tags+useful+for+chapter+pages:
However, since we now have inline tag grids, which are much more powerful and flexible, would you be all right with our deprecating the notes:____ tag feature?
https://publiclab.org/wiki/power-tags#Inline+power+tags
If you'd like an image-based display of tagged notes, rather than a table, we do have this issue along those lines: https://github.com/publiclab/plots2/issues/1097
I can't remember what was on the Vermont wiki page or whether I'm the one who put the content there. So I don't have much understanding of these issues, and I can't see the page to refresh my memory. I'm sure any changes you make will be good ones.
Hi, I'm interested in taking this on. Will look at it now.
This was solved by @tyricec and we should be able to publish the fix in the next few days! Thank you very much @tyricec!!! And to @Fastie for helping diagnose this.