Viima / jquery-comments

The Javascript library of choice for implementing commenting in your web app
http://viima.github.io/jquery-comments/
MIT License
294 stars 118 forks source link

Parent issue while posting comments #113

Closed sanford000 closed 7 years ago

sanford000 commented 7 years ago

We are using the comments plugin and encounter following issue :

We posted a comment and the data contains : id:c12 parent:

commtns0

above data is saved to the DB with no parent, fine till now.

then we replied on the above comment without refreshing the page, the data we get now is : id:c13 parent:c12

commtns

Now how do we change the above to match the original parent i.e c12 from the Database.

I tried to change the data.parent after the ajax is finished but the comments are posted before that.

Can you please reply on above problem ?

blimey85 commented 7 years ago

If I'm understanding you correctly, you aren't having a problem. So your first comment goes in as c12. Then you post a reply to that comment and this new comment, a reply, goes in as c13, which is also fine. The parent of this reply, the comment you replied to, is c12 and so the parent gets set as c12 on your reply. Am I missing something? This all looks correct to me.

sanford000 commented 7 years ago

Blimey, thanks for your reply actually i have to save the comments in the DB according to its parent, i have now resolve it by changing the parent during runtime, so now its saving correctly in DB.

Thanks anyways.

Rohitgowda commented 6 years ago

Hi Sanford, I am facing the same issue can you please elaborate the solution. Thanks