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
Getting started #8
Comments
After reviewing one of the closed issues I realized this was supposed to be addressed. The bug is still there in the minified code (different but the same basic problem). Its not finding commentID and throwing errors. Also the use of a double assignment. |
I pulled the version from the other branch gh-pages. This version does not throw the error. Although it still is using the double assignment methods which is not recommended. (Netbeans generates a warning here). |
This version works: http://viima.github.io/jquery-comments/demo/js/jquery-comments.js |
I pulled that version and tried it. If I format my data as standard json (being pulled in via the getComments: method via a php url I get an error. TypeError: commentsArray.map is not a function The format of the data returned is Direct copy of the sample data. I also tried converting to an array by enclosing it in [] both with an assignment to the var and not. (var commentsArray = [ etc). So there is some stupid simple thing I'm missing here. Do I need to json encode the return string? Or is there as this indicates a missing or renamed function or method in the script? Any help here would be appreciated. |
There was indeed a bug with the latest commits, a small change we made in #6 was the reason for this so we reverted the changes made there. Now it should work again. |
Really not working and not fixed, i have exactly the same problem i give the comment back as one singe somment:
How can i return more then 1 comment in one array? |
I downloaded and installed the package exactly as shown. Used the sample code for a starting point.
On both the demo, and on the start up I have going. It fires a jquery / javascript error when you make a change to the text, and then of course the send button does not un-disable and the script is dead.
The error I get is
TypeError: this.commentsById[commentId] is undefined
var contentChanged = content != this.commentsById[commentId].content;
At line 545. If you look at the source code its looking for an attribute data-comments that does not exist on the textarea or its surrounding wrappers. I found the area in the code that defines the dom of that object. Tried adding it.
I'm a newbie here. I've done a lot of jquery work, and tried to debug this on my own. After a couple of hours I figured I'd better simply ask someone. Either there is something left out of the setup instructions, or I've missed something.
The text was updated successfully, but these errors were encountered: