Home › Forums › Comment box for SharePoint › CommentBox script not work together with ListAttachment
- This topic has 4 replies, 3 voices, and was last updated 8 years, 11 months ago by AdamP.
-
AuthorPosts
-
-
June 19, 2015 at 09:42 #7761
I use two your solution in one page, first comment box and after I add link to ListAttachment (http://t.co/rEKMaMYpTt) there is not shown comments at all,and alert this message alert([CommentBox for SharePoint] You must provide a placeholder with the ID in the page (you can add it to the CEWP code).
Attachments:
-
June 25, 2015 at 22:42 #7770
Hi,
Sorry for the late reply. Did you by any chance inclued jQuery two times to the page? – this could explain this behavior. If you did, try removing the additional script tags referring to jQuery.Alexander
-
January 16, 2016 at 02:55 #9916
Sorry to reawaken this thread after 6 months. I’ve just experienced exactly this issue, but unfortunately I’m not loading jQuery twice. I’ve also found that I can suppress the problem by changing the order of the scripts.
Config that gives me the error message and prevents comment box (licensed version) from loading;
CEWP-load jQuery (1.11.2)
CEWP-comment box
CEWP-hit counter and star ratingThis order generates the attached error message and comment box doesn’t load, but the page view is recorded in the hitcounter list.
However if I change the order to;
CEWP-load jQuery (1.11.2)
CEWP-hit counter and star rating
CEWP-comment box
Then everything is fine and works correctly. For a number of reasons I need to get the hitcounter below the comment box. Any ideas what exactly is going on here?
I split out jquery to be sure it is only loaded once, and on their own hit counter and comment box work correctly, so it does seem to be an incompatibility between the two scripts.Thanks
Adam
Attachments:
-
January 20, 2016 at 09:37 #9934
Hi,
I guess this has to do with the variable “argObj” being used for both solutions. If you change the variable name for one of the scripts (in the function call in the CEWP) it should not interfere.Let me know if this helps.
Alexander
-
January 20, 2016 at 22:47 #9959
Spot on Alexander! Thank you.
I’ve renamed argObj to cBoxObj and hitObj in the respective CEWPs and all is well again.
Adam
-
-
AuthorPosts
- You must be logged in to reply to this topic.