souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
391 stars 63 forks source link

Error if anonymous comments disabled #5

Closed dehgriff closed 3 years ago

dehgriff commented 3 years ago

I've configured commento to just allow Google login. When I submit a comment, I get this error:

commento.js:formatted:424 Uncaught TypeError: Cannot read property 'value' of null
    at HTMLDivElement.E.commentNew (commento.js:formatted:424)
    at yn (commento.js:formatted:724)
    at kn (commento.js:formatted:728)
    at HTMLButtonElement.<anonymous> (commento.js:formatted:38)

The problem is at line 827 of commento.js:

      "anonName": $(ID_GUEST_DETAILS_INPUT + id).value,

$ID_GUEST_DETAILS_INPUT evaluates to null. I assume because the Guest name box is not there.

AlvaroDeMenard commented 3 years ago

It doesn't work even when anonymous comments are enabled. The name textbox never shows, and trying to comment gives the error "One or more field(s) empty."

souramoo commented 3 years ago

Eek yep this was an oversight on my part, fixed in 2e5026f7316a650d415e64c97e59f51cb0707af6 :)

@AlvaroDeMenard this sounds like a separate bug, please could you share an example of a page with this bug on with me and I will try and fix it?