CommentBox script not work together with ListAttachment

Home Forums Comment box for SharePoint CommentBox script not work together with ListAttachment

Viewing 4 reply threads
  • Author
    Posts
    • #7761
      Shakizat Almenov
      Participant

        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:
      • #7770
        Alexander Bautz
        Keymaster

          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

        • #9916
          AdamP
          Participant

            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 rating

            This 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

          • #9934
            Alexander Bautz
            Keymaster

              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

            • #9959
              AdamP
              Participant

                Spot on Alexander! Thank you.

                I’ve renamed argObj to cBoxObj and hitObj in the respective CEWPs and all is well again.

                Adam

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.