Hi all! I am having a bit of trouble while trying to add my name on the list of potential mentors for GSoC, as can be seen below. The same message shows up whether I am logged in or not. The same error happens with any of the projects on the list. If it happens to be relevant, I don't have anything related to plots2 installed in my computer, just JavaScript projects.

Setup: Firefox Quantum 65.0.1 (64-bit) or Microsoft Edge, Windows 10.
Hey @IgorWilbert, have you started working on solving this issue or you want others to try? Thanks for opening the issue.
Hi @gauravano ! I would like others to try it, since currently I haven't plots2 installed. Sorry for not saying it right away.
No issue :+1:
Oh, i see a "lock" icon on the wiki page - i believe that due to wiki spam, we started blocking wiki edits until people have made... i can't remember if it's one comment or one post. So that is now blocking the inline input prompts! Great catch.
We could... exempt the inline prompts from that restriction, and that's probably a good idea - -the route is https://publiclab.org/wiki/replace/
However, it looks like we may have another issue - i'm getting a 404 for that even as user "warren" -- maybe something's broken?
The test doesn't look like it's been touched for 9 months: https://github.com/publiclab/plots2/blame/master/test/functional/wiki_controller_test.rb#L441-L449
The request as sent from the browser was:
before: [prompt:text:Your name here]
after: * Liz Barry (@liz)
[prompt:text:Your name here]
Not sure why that didn't work!
So, in summary, 2 potential overlapping issues - the worst kind of bug!
Actually i think the 'replace' action is already exempted from the first-time-poster limitation, because that's only enforced in the update action: https://github.com/publiclab/plots2/blob/master/app/controllers/wiki_controller.rb#L192
Can someone test out:
[prompt:text:Your name here] in the middle of some wiki page and hit SaveAddHuh, just noting that I tried this and it worked without an error... will try again but with a copy of the gsoc-ideas page!
Hmm, what's weird is that on regular editing of the page, i'm seeing:
Mysql2::Error: Column 'vid' cannot be null: UPDATE `node` SET `vid` = NULL, `changed` = 1551914161 WHERE `node`.`nid` = 49
app/controllers/wiki_controller.rb:469:in `block in update_node_attributes'
app/controllers/wiki_controller.rb:454:in `update_node_attributes'
app/controllers/wiki_controller.rb:197:in `update'
@siaw23 is that potentially related to instance variable handling in the private method at the end of the wiki controller?
@siaw23 you should be able to force push to the unstable branch, and I'll add the prompts there:
https://unstable.publiclab.org/wiki/gsoc-ideas
Oddly they're not showing the form there, i don't know why...
Yeah I think it might be that totally forgot I wasn't using a callback. Making it public. @jywarren
Aha! I think i figured it out!!! It relies on there not being multiple identical prompt tags in the same page, or it doesn't know which to replace!
So, we should fix that, but I think a short term fix is easier, to add some unique text in each prompt... doing this now...
Can you push a fix for the 'input box' thing so I have a look, because I think we have different ideas/solutions? Then we can figure out which one is best and test it... a system test would be good for this one.
Yep, that worked! Changing them to be something unique now.
Now we need to brainstorm how to fix this more broadly.
I'm actually solving it by changing the [prompt:text:LEL mentor names here] codes in the wiki content, so it's not a code fix at all. What's your solution? Maybe it solves the underlying issue?
Thanks!
Ah my fix is about the current_user being nil for the wiki page...I think so I have a test fix with commented out tests to check if I'm right, if I am then we'll fix the tests.
In the mean time this should fix the editing issue... https://github.com/publiclab/plots2/pull/4933 can we have that merged and checked after CI passes?
OK great. I've made each prompt on the page unique as well. Thank you!
And updated the title to reflect the resolution of the gsoc page issue (quick fix) as well as the broader issue we've identified. Super, thanks all!