Comments (13)
Can you paste a code example or (preferably) a link to a CodePen demonstrating the issue so that I could dig into the problem more deeply?
from jquery-comments.
You can check this url http://codepen.io/shandy05/pen/EPqeGm, try to reply and reload
from jquery-comments.
There was a bug indeed when comparing the dates of two comments, this is now fixed in the newest version 1.1.1. The fix was done in: 5a0b13a
from jquery-comments.
still not working :(
from jquery-comments.
Now I got it working in codepen after 5d5bed4. Still, I don't understand why it works after this commit, I think there are some issues in your data. For example, there may be a parent comment that has a timestamp later than one of its replies
from jquery-comments.
ok, thanks for help
from jquery-comments.
Did you get it working after the latest commit?
from jquery-comments.
sometimes working, I don't know where is problem
from jquery-comments.
Unfortunately I don't have time to investigate this issue right now but you can do so if you will. The problem is in sorting the comments at the beginning, line 635:
comments.sort(function(commentA, commentB) {
var createdA = new Date(commentA.created).getTime();
var createdB = new Date(commentB.created).getTime();
if(sortKey == 'oldest') {
return createdB - createdA < 0;
} else {
return createdB - createdA > 0;
}
});
For some reason the comments are not sorted by date and thus the parent of a certain comment cannot be referenced in the commentsById dictionary.
from jquery-comments.
ok, i will try to investigate, thanks jjtykkyl :)
from jquery-comments.
I found the same bug on my own project. Also i figured out that my mistake was I got some comments from server without date and this was the reason, because comments firstly sorted on line 272:
// Sort comments by date (oldest first so that they can be appended to the data model
I removed all comments without date and it works
from jquery-comments.
Hello, was this problem resolved? Because i tried everything suggested above, and the problem is still coming. I noticed that when i add more than a certain amount of data.. i deleted all the data and tried again, the same problem..I amended the comments-data.js and added one more comment, and it gives the same problem, can that more than 10 comments causes problems or am I doing something wrong? Thanks!
from jquery-comments.
Hi everybody! It's been a while since last post here, but I might have a good news for those who still struggle with this strange bug or will in the future. A bit of a workaround...
When implementing this plugin, make sure to have timeFormatter()
function added to your config. It must return time format that include time along date (e.g. G:i M, d Y
). That is the only way to have proper loading order of comments, and to avoid missing parent for comment replies.
Hope this will help someone.
from jquery-comments.
Related Issues (20)
- Problem with duplicate comment ID. HOT 2
- How to use CKeditor HOT 2
- I have tried to install and didn't succeed... HOT 1
- set up database HOT 1
- If the user name contains any regex metacharacters, the ping highlighting does not work. HOT 1
- Publish latest version to npm HOT 1
- Do you have any react integration example ? HOT 1
- Duplication when enableNavigation is false
- mail notification HOT 1
- Limit number of attachments
- Dynamically Click Comments Textbox using Button
- Comments search engine
- Scroll and focus on textbox when clicking on "reply"
- enableEditing model
- Make linkify optional
- hasAttachments function should test if attachments property exists
- I need help how to set up complete on website for a html NOOB HOT 1
- Issue in APEX 22.2.3
- Comment author - "You"
- URGENT: Advanced comment webpart solution stopped working after reaching 5k items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-comments.