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
Uncaught TypeError: n.map is not a functionn @ jquery-comments.min.js #74
Comments
Hi Can you please guide how you design the table and saving the data Are you using Mysql? |
Hmm according to me its not going to resolve the tree structure data as i read we have to use closure table ,to resolve the issue.I am not sure about your project structure so i cannt say more but for my project i am looking for closure table . |
Oh... just googled a bit about it, had no idea about this. Will look into this, thank you! |
May I also ask, should this table be called everytime a comment is posted or only when someone clicks on reply? Also, what is the role of this table in get function, because till now i have directly entered comments in database and called getfunction as above. |
That what i want to discuss with you as you already developed thing in your application i am just starting my application to use it any how its these both table combination only will deliver the result and we have to use UNION ALL as per my R&D. |
oh ok... will further look into it!.. thanks |
Hi, just to let you know, I solved my problem and didn't need closure table, atleast not yet. I was not returning my post data properly. Although I am not sure how and where closure table will be used as in comment-data.js there seems to be just commentsArray, and although it does have a "parent" element it has nothing like depth/level. I am not sure if its being used. Anyways, if you figure out how to use it please let me know! Thanks for all your help! |
But for long run where too many comment its cause slow DB and application but its ge8 your issue resolved |
With me it not works at all as well, i cant return an array from ajax, it gives me the error: `
` |
Hi, I think its related to the data get comment has 2 retrieve.... Check if and when u r posting data it is being posted correctly or if u r using data directly it's in correct format..... I don't remember exactly but I think when I was using get without post and using data from sql there were some issues... |
Hello,
I am a novice to web development/js/jquery and I tried using the jquery-comments, I modified the getcomments function as follows:
getComments: function(success, error) { var comment_get_data = {'articleid':articleid, 'function':'getComments'}; $.ajax({ type: 'post', url: 'http://localhost/website/functions/comments.php', data: comment_get_data, success: function(commentsArray) { success(commentsArray) }, error: error }); },
and my comments.php has the following return functionality:
`case 'getComments':
and I am getting the uncaught type error n.map is not a function, I am not sure what I am doing wrong, any help is appreciated. Thanks for the code and thanks in advance for your help!
The text was updated successfully, but these errors were encountered: