Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to comment on research module #3508

Closed
pizzaisdavid opened this issue May 7, 2024 · 10 comments
Closed

Unable to comment on research module #3508

pizzaisdavid opened this issue May 7, 2024 · 10 comments
Assignees

Comments

@pizzaisdavid
Copy link
Contributor

pizzaisdavid commented May 7, 2024

Describe the bug
As a user, I want to be able to give feedback on someone's research but cannot. Trying to leave a comment doesn't work.

Screenshot from 2024-05-07 21-42-12

Steps to reproduce the behaviour

  1. Go to https://community.projectkamp.com/research/can-we-find-alternative-solutions-for-food-storage-
  2. Write comment.
  3. Press submit
  4. Be sad.

Expected behaviour
My comment is published.

Additional context
There is some output in the console, this snippet might be of interest:

Failed to set comment {
  err: [Error: n is undefined]
}

click here for full console log output

Currently, commenting works on the development environment (https://precious-plastics-v4-dev.firebaseapp.com/research/lc-test-240506-0059 I am the account called testtesttest.)

source: https://discord.com/channels/586676777334865928/1237309179937689625/1237415816375435438

@pizzaisdavid pizzaisdavid changed the title Unable to leave comments on research modules Unable to comment on research module May 7, 2024
@benfurber
Copy link
Member

Thanks @pizzaisdavid. Starting to look now.

@benfurber benfurber self-assigned this May 8, 2024
@benfurber
Copy link
Member

benfurber commented May 8, 2024

Like @pizzaisdavid I can't replicate locally.

I'm copying over a research item from prod into the dev db to see if there's some about the shape of the live data that's causing a problem.

The research which I couldn't add a comment to on prod (https://community.preciousplastic.com/research/turn-precious-plastic-into-a-dao) I could add a comment to on dev (https://dev.onearmy.world/research/turn-precious-plastic-into-a-dao)

@benfurber
Copy link
Member

I can still make a comment...

@benfurber
Copy link
Member

benfurber commented May 8, 2024

Oh wait, is this because of the updated security roles...?

Update: no.

@benfurber
Copy link
Member

Did some more prod testing(!)

I was able to add a comment to the last update on this research: https://community.projectkamp.com/research/can-we-renovate-a-granite-ruin
But not this older research...: https://community.projectkamp.com/research/can-we-make-a-roof-from-recycled-plastic

@benfurber
Copy link
Member

I can't replicate the 'fine for newer' but 'broken for older' locally. All are fine.

@benfurber
Copy link
Member

I wonder if it's something about pre-existing but empty discussion documents.

@benfurber
Copy link
Member

I deleted the discussion for the last update on here: https://community.preciousplastic.com/research/turn-precious-plastic-into-a-dao

I was then able to sucessfully add a comment.

@benfurber
Copy link
Member

I then added a second comment, deleted both and then sucessfully added a new 'first' comment. So it's not about the comments being empty.

The only difference is the new discussion object had a 'contributorIds' array. So that looks like the issue.

@benfurber
Copy link
Member

I've updated the prod data so all discussions now has the contributorIds arrray. Now users can add comments again! YAY!

Tomorrow I'll fix the brittle implementation that caused this. And update the contributorIds to have the ids each should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants