isso-comments / isso

a Disqus alternative
https://isso-comments.de
MIT License
5.03k stars 440 forks source link

"TypeError: e(...) is null" when Editing Posts #113

Closed tohuw closed 10 years ago

tohuw commented 10 years ago

Upvoting or downvoting produces no results, and attempts to edit produce "TypeError: e(...) is null" in my JS console (Firefox). Deleting, replying, posting, etc. work fine.

Isso installed via pip. One thing I noticed is that misaka could not install via pip on my Debian Testing x64 server, so I had to install python-misaka from apt. The version there is 1.0.2-3+b1.

The site is https://tohuw.net/test/test-post

FWIW, I have this same issue on my OS X dev system, including the inability to install misaka cleanly via pip (though it does report installed there).

My isso.cfg:

[general]
dbpath = /etc/isso/db/isso-comments.db
host =
    http://tohuw.net/
    https://tohuw.net/
max-age = 1h
notify = stdout

[server]
listen = http://127.0.0.1:8080
reload = on
profile = off

[moderation]
enabled = false
purge-after = 60d

[guard]
enabled = true
ratelimit = 2
direct-reply = 3
reply-to-self = false

[markup]
options = strikethrough, superscript, autolink
allowed-elements =
allowed-attributes =

My nginx location directive:

    location /isso {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Script-Name /isso;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://127.0.0.1:8080;
    }

On the page:

{% if ISSO_ENABLED and article.status != "draft" %}
    <script data-isso="{{ SITEURL }}/isso/" data-isso-css="{% if ISSO_DEFAULT_STYLE %}true{% else %}false{% endif %}" data-isso-avatar="{% if ISSO_AVATARS %}true{% else %}false{% endif %}" src="{{ SITEURL }}/theme/isso/embed.min.js"></script>
    <section id="isso-thread"></section>

Let me know if I can provide anything else.

tohuw commented 10 years ago

This is probably related somehow, but the comment counter script doesn't work either; see https://tohuw.net/index2.html

EDIT: actually, it looks like it's trying to post the query to the wrong place, but I'm not sure how to fix this. I see the following in the console:

POST https://tohuw.net/count [HTTP/1.1 404 Not Found 42ms]
POST https://tohuw.net/theme/i/count
tohuw commented 10 years ago

As an additional oddity, if I post a comment with a name, email or website attribute, I can't post additional comments with attributes due to "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data [on] embed.min.js:19"

I'm putting all these together because I'm rather certain I've goofed up something in the implementation.

posativ commented 10 years ago

Isso is working correctly, it just does not show known server errors:

The last two can be configured with the [guard] settings in the server configuration. The first is known, but there is no visual feedback of the "error" yet.

I made a test comment and was able to edit my comment (using Google Chrome Beta 37).


Misaka has been used for the speed, but the next release will cache the converted HTML (not because of Misaka but the slow HTML sanitizer) and I might switch to a native Markdown implementation.

posativ commented 10 years ago

This is probably related somehow, but the comment counter script doesn't work either; see https://tohuw.net/index2.html

If you host the JS on a different location, you must add the API location of Isso, e.g.:

<script src="count.min.js" data-isso="/path/to/isso/endpoint">
tohuw commented 10 years ago

Oh man, why didn't it occur to me I can't vote on my own?! Makes perfect sense. I knew about the replying to self thing. Now I get the other settings I copied from your example for guard. Heh. Maybe I'll contribute some client feedback changes, since I know client work isn't your favorite thing. :) Thanks posativ!

tohuw commented 10 years ago

If you host the JS on a different location, you must add the API location of Isso

Yep, that worked. Thanks again.