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

Error 500 on showing note with no visible comments #2146

Open
westnordost opened this issue Feb 17, 2019 · 13 comments
Open

Error 500 on showing note with no visible comments #2146

westnordost opened this issue Feb 17, 2019 · 13 comments
Labels
notes Related to the notes feature

Comments

@westnordost
Copy link

Observed behavior

Displaying a note with no comments yields an error 500.

How to reproduce

Display this note: https://www.openstreetmap.org/note/940980
the note via the API: https://api.openstreetmap.org/api/0.6/notes/940980

Expected behavior

  1. The OSM Api should reject creating a note without an initial comment
  2. Either all current notes with no comments are deleted from DB or displaying a note with no comment should not yield an error 500
@tomhughes
Copy link
Member

I don't think that's true is it. I thought @Firefishy established that the cause was that the creator of the note had been deleted because they were a spammer?

@tomhughes
Copy link
Member

So the immediate cause might be that there are no (visible) comments, but the conclusion that the API allows creation of a note without a comment is not - the only bug here is the exception when a note has no visible comments.

@westnordost
Copy link
Author

That might as well be, I can't see whether it is invisible or never existed, I only reported what I saw. Anyway, if the (only) comment was deleted, then error 500 would still not be appropriate.

@tomhughes
Copy link
Member

Sorry I assumed it was you that had been discussing it with @Firefishy on IRC last night but I now see that it wasn't and in fact that was a different note.

@tomhughes
Copy link
Member

The cause is essentially the same - the user that opened this note deleted their account causing their note comments to be hidden.

This wasn't a spam note though, which raises the question of whether we should in fact hide comments from deleted users or not, or whether we should just treat them as anonymous,

@westnordost
Copy link
Author

I guess a good approach would be to treat it the same as map data and GPS traces a deleted user contributed.

ENT8R added a commit to ENT8R/NotesReview that referenced this issue Feb 19, 2019
@tomhughes tomhughes changed the title Error 500 on showing note with no comments Error 500 on showing note with no visible comments Apr 30, 2021
@Dimitar5555
Copy link
Contributor

@tomhughes
Copy link
Member

That would be why this issue is still open yes. Did have something useful to add?

@Dimitar5555
Copy link
Contributor

The note that westnodorst linked seems to no longer results in a HTTP 500 error and currently it has content (i.e. it's not empty).

@Discostu36
Copy link

Sorry for not finding this issue before opening mine. I think you should hide/delete these notes. There is no use for empty notes leading to error pages, it only makes maintenance harder.

@tomhughes
Copy link
Member

We already have a plan (#3831) to fix this which we have started work on.

@kmpoppe
Copy link

kmpoppe commented Mar 6, 2023

@tomhughes by skimming the planet-notes.osn I found 1555586 and 1555588 which seem to have no public comments. They're from 2018, are those a symptom of the original user having deleted their account?

@pa5cal
Copy link

pa5cal commented Dec 16, 2023

@tomhughes by skimming the planet-notes.osn I found 1555586 and 1555588 which seem to have no public comments. They're from 2018, are those a symptom of the original user having deleted their account?

Yes, the note was hidden, perhaps because of its text content or the original user was deleted.
Then someone else closed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes Related to the notes feature
Projects
None yet
Development

No branches or pull requests

7 participants