Redirected pages not listed in wildcard tag listing
This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @jywarren to get it labelled. Or, if this is not your first time, try to solve it yourself!
Background
Some pages have a tag like redirect:pagename where pagename is the name of another page which the viewer should be automatically redirected to. Documentation:
https://publiclab.org/wiki/power-tags (look for redirect)
This behavior is captured (at the controller level) in this test:
https://github.com/publiclab/plots2/blob/master/test/functional/wiki_controller_test.rb#L507-L516
Problem
These redirected pages should be listed on this tag listing page for wiki pages, using the wildcard redirect:* -- but nothing is shown there:
https://publiclab.org/wiki/tag/redirect:*
There are definitely redirected pages, like this one:
https://publiclab.org/wiki/camera-triggering
Next steps
We should write a functional test to ensure that such tags appear on that tag listing page. There is already one for notes, but the separate action to display wiki pages is not tested:
https://github.com/publiclab/plots2/blob/master/test/functional/tag_controller_test.rb#L160-L167
I believe it uses the same action, but changes the params[:node_type] parameter:
https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb#L23-L25
Once the test correctly describes this bug, changes to the tag controller will be able to resolve the problem.
I will take up the issue
Yes please, we appreciate it!
@jywarren Could you please make sure if he's working on it and remove the fto-candidate label if that's the case? Cutting down on fto-candidates. Thanks.
Hi, @StlMaris123 - would you like me to assign this issue to you, or are you working on another (I think i've seen your PR on another)? Thanks!
Yes, I will work on both. If i encounter any challenge i will get to you
Great!
@jwarren I want to work on this. Can I..?
@StlMaris123 - are you currently working on this, and if not, could @MayankKashyap give it a try? But there are plenty to go around, so Mayank, if you have already claimed another please let @StlMaris123 have a try at this. Thanks, all!
@jwarren https://github.com/jwarren yes am on it, i just finished the other issue so am on this one now. Am sorry for taking too long
On Tue, Mar 7, 2017 at 1:23 AM, Jeffrey Warren [email protected] wrote:
@StlMaris123 https://github.com/StlMaris123 - are you currently working on this, and if not, could @MayankKashyap https://github.com/MayankKashyap give it a try? But there are plenty to go around, so Mayank, if you have already claimed another please let @StlMaris123 https://github.com/StlMaris123 have a try at this. Thanks, all!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1293#issuecomment-284553570, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdR2bTfr0XRAOJb5ySHh3jVa8jAoXvdks5rjIdcgaJpZM4MMeFv .
Hello @jywarren , how about this test?
test "should show a featured wiki page at top, if it exists" do
tag = tags(:test)
get :show, id: node(:organizers).slug
assert_select '#wiki-content', 1
end
is there a relationship between it and what am supposed to test?
Hello Jeffrey, please shed some light on Redirected pages not listed in wildcard tag listing #1293. I am having trouble understanding the problem part. I will really appreciate your help. Thank you. Warm regards, Stella.
On Tue, Mar 7, 2017 at 9:23 AM, stellamaris njage < [email protected]> wrote:
@jwarren https://github.com/jwarren yes am on it, i just finished the other issue so am on this one now. Am sorry for taking too long
On Tue, Mar 7, 2017 at 1:23 AM, Jeffrey Warren [email protected] wrote:
@StlMaris123 https://github.com/StlMaris123 - are you currently working on this, and if not, could @MayankKashyap https://github.com/MayankKashyap give it a try? But there are plenty to go around, so Mayank, if you have already claimed another please let @StlMaris123 https://github.com/StlMaris123 have a try at this. Thanks, all!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1293#issuecomment-284553570, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdR2bTfr0XRAOJb5ySHh3jVa8jAoXvdks5rjIdcgaJpZM4MMeFv .
Hi, @StlMaris123 -- my sincere apologies for responding so slowly to this. I must've missed it and am reading it over now. Thank you so much for your patience!
Hi, so, we're looking to test something very similar to this test:
test "wildcard tag show" do
get :show, id: 'question:*'
assert :success
assert_not_nil :tags
assert :wildcard
assert_select '#note-graph', 0
end
But with an additional parameter, :node_type, so we check for wiki pages, not notes:
test "wildcard tag show wiki pages" do
get :show, id: 'question:*', node_type: 'wiki'
assert :success
assert_not_nil :tags
assert :wildcard
assert_select '#note-graph', 0
end
Can you try that out and see if you get an error when you run the test? If so, that's the error we've identified and we should start figuring out how to fix it. Thanks!
Thanks. Working on it now
Hi @jywarren the tests are passing locally
Hmm, I suppose that means we haven'tcompletely reproduced the bug. Are you sure there exists a wiki page in the tests that fairly closely matches the one described in the bug report? Are we asserting the right things?
On Mar 21, 2017 3:06 PM, "StellaMaris Njage" [email protected] wrote:
Hi @jywarren https://github.com/jywarren the tests are passing locally
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1293#issuecomment-288185956, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJyUuw05-EiFpq_Ieq9VFcsvGCJfWks5roB-3gaJpZM4MMeFv .
I think there is a difference between the two tests.One tests for a featured wiki page if it exists while the other one tests for a wiki page after the wikd card