plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

"+Add one now" button to create a lead wiki page from Tag Pages does not work

Open ebarry opened this issue 8 years ago • 14 comments

Hi folks! tiny thing i just ran into --

Please describe the problem (or idea)

What happened just before the problem occurred? Or what problem could this idea solve?

I visited publiclab.org/tag/lead and clicked the "Add one now" button and nothing happened. screen shot 2018-08-16 at 10 57 50 am

What did you expect to see that you didn't?

I expected to load an editor with the prefilled URL publiclab.org/wiki/lead and be able to start creating content.

Please show us where to look

https://publiclab.org/tag/lead

What's your PublicLab.org username?

This can help us diagnose the issue:

liz

ebarry avatar Aug 16 '18 15:08 ebarry

UPDATE: i've actually gone ahead and created the main wiki page for lead, so this example might not work anymore. See https://publiclab.org/tag/water instead. thanks!

ebarry avatar Aug 16 '18 15:08 ebarry

Yeah same here I also got this some time ago when I was adding a lead wiki page (while working with #3234) in localhost @ebarry. Have to see the problem behind it.

Souravirus avatar Aug 16 '18 15:08 Souravirus

@ebarry do you wish to be redirected to the page shown in the screenshot below after clicking on "+Add one now" ? wikinewpage

If yes then I think I can fix this!

shubhscoder avatar Sep 05 '18 14:09 shubhscoder

Hi! I think the idea is that when going to a page like /wiki/some-page-name, and that wiki page doesn't exist, that it shows the form and prompts you to make that page. This is how it used to work -- non-existent pages showed a form to create that specific page. We must've unintentionally changed this in our tag redirects -- i attempted a fix here but it didn't work: https://github.com/publiclab/plots2/pull/3189

I'd LOVE some help with this!

On Wed, Sep 5, 2018 at 10:03 AM Shubham Sangamnerkar < [email protected]> wrote:

@ebarry https://github.com/ebarry do you wish to be redirected to the page shown in the screenshot below after clicking on "+Add one now" ? [image: wikinewpage] https://user-images.githubusercontent.com/18489285/45098234-329e6780-b142-11e8-8feb-536dd1cb51a2.png

If yes then I think I can fix this!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3236#issuecomment-418742019, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ10LX4IL-GsfbZwxSbiq5hJ7d4YEks5uX9lwgaJpZM4WACLq .

jywarren avatar Sep 05 '18 17:09 jywarren

Does this make sense @shubhscoder -- that we'd display the template for /wiki/new but on the URL for /wiki/________ (where ______ is a non-existent wiki page)?

jywarren avatar Sep 05 '18 17:09 jywarren

Yeah I think that should work @jywarren .

shubhscoder avatar Sep 05 '18 18:09 shubhscoder

So, i think it should link to /wiki/<%= params[:id] %> so that it prompts you to create a new page at that address. But it's what happens at that address that's broken, and that should be worked out at the lines of code in my pull request -- take a look!

On Wed, Sep 5, 2018 at 2:26 PM Shubham Sangamnerkar < [email protected]> wrote:

In file app/views/tag/show.html line number 36 where href points to something weird. I think it should link to wiki/new/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3236#issuecomment-418832292, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ8R_ci52VQ5Yb6pVKOiJsFEPwTLyks5uYBdBgaJpZM4WACLq .

jywarren avatar Sep 05 '18 18:09 jywarren

super -- thank you!

On Wed, Sep 5, 2018 at 2:39 PM Shubham Sangamnerkar < [email protected]> wrote:

Yeah I think that should work @jywarren https://github.com/jywarren .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3236#issuecomment-418836240, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ300a2v7pwlh0t1X8Epth0WFRX4Wks5uYBovgaJpZM4WACLq .

jywarren avatar Sep 05 '18 18:09 jywarren

No problem. Are there any more such issues that can be worked out ?

shubhscoder avatar Sep 05 '18 18:09 shubhscoder

Ah, sorry, i mean to say that my PR /attempts/ to solve the problem in this way, but I encountered some errors and test failures and think I did it wrong. I'd LOVE some help resolving those if you want to take my PR as a starting point?

jywarren avatar Sep 05 '18 18:09 jywarren

Yeah sure I can try that! If you simply link it to wiki/new then it would open up the post edit window without any default information and that is not desired right?

We want it to autofill the create page textbox with params[:id] i.e the name of wiki page that was requested and not found ?

Please correct me if I haven't misunderstood the issue. Thanking you. :)

shubhscoder avatar Sep 05 '18 18:09 shubhscoder

That's right. I think we /could/ redirect to /wiki/new?title=_____ to offer default info... so /wiki/newpagename would redirect to /wiki/new?title=newpagename if that page doesn't already exist.

On Wed, Sep 5, 2018 at 2:57 PM Shubham Sangamnerkar < [email protected]> wrote:

Yeah sure I can try that! If you simply link it to wiki/new then it would open up the post edit window without any default information and that is not desired right?

We want it to autofill the create page textbox with params[:id] i.e the name of wiki page that was requested and not found ?

Please correct me if I haven't misunderstood the issue. Thanking you. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3236#issuecomment-418842257, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3Ra4tADVsiQasNzjMSEYoqtyK5Nks5uYB6GgaJpZM4WACLq .

jywarren avatar Sep 05 '18 20:09 jywarren

Would this be a good issue for Google Code In? Or maybe we're already on the way to wrangling it ourselves......

ebarry avatar Sep 12 '18 15:09 ebarry

@shubhscoder I think that's up to you -- have you begun work on this one? We'd love your help!

jywarren avatar Sep 12 '18 15:09 jywarren