Skip to content
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

Synchronizing the comment ID with an external source #44

Closed
jlennoxmht opened this issue Mar 7, 2016 · 3 comments
Closed

Synchronizing the comment ID with an external source #44

jlennoxmht opened this issue Mar 7, 2016 · 3 comments

Comments

@jlennoxmht
Copy link

We are using the jquery-comments plugin in our code and seek some guidance because we are not sure that this is an issue. We have created a SharePoint list which holds the comments and they are initially loaded into the plugin via an AJAX call.

Here is the sequence of events:

  1. we add a new comment via the plugin
  2. in the post handler we get the newly created comment and note that it has an ID prefixed with the letter 'C' and an ascending number based on the number of comments. The comment is correctly displayed in the page.
  3. We insert that record into a SharePoint list and it creates a new ID.

The issue we need to resolve is that the ID for the comment in memory needs to be identical to the one that we create in the SharePoint list. By the time we get the comment that the plugin creates in memory, we don't have a convenient way to change it.

We are considering adding a method onto the prototype to find and modify the comment that was just created. We need to do this because if the user does anything else to the comment that just got created then the temporary ID is used in the AJAX call and we fail on the SharePoint side. Note that if we close the comments plugin and reload the comments, then the records work just fine with the ID that we give it when the item is inserted into the SharePoint list.

We are asking for guidance on whether or not we should request a pull or perhaps you have an idea that would be less intrusive.

Thank you in advance for any thoughts.

@jlennoxmht
Copy link
Author

Please disregard this issue, we have figured it all out and have it working from SharePoint lists to the comments plugin for query, insert, delete, and update.

As the issue on support for multiple comments on a single page articulated, we now have to solve that problem as well. I hope you accept the code from shelane and fold it into your awsome plugin.

@jessenieminen
Copy link
Member

Thanks for your comments, glad to hear you were able to solve the issue!

We'll definitely look into shelanes pull request and are hoping to merge it a month or so, we unfortunately have our calendar swamped for now and need to test the PR thoroughly to ensure it's working correctly and will not create any new issues.

@AleksKon
Copy link

AleksKon commented May 2, 2018

@jlennoxmht I'm facing the same issue when working with a SharePoint list. Can you please share your solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants