Please upgrade here. These earlier versions are no longer being updated and have security issues.

not working with editer

This discussion is related to the Inform New Comments addon.

i enable this pluging but editer button not working

Comments

  • whenever you see

    it means js is broken.

    you would see that in your web console if you checked for errors.

    e.g.
    
    TypeError: document.getElementById(...) is null
    
    
    var lastCommentID = document.getElementById('LastCommentID').getAttribute('value...
    

    in plugins/InformNewComments/js/ informnewcomments.js line 21 which says.

    var lastCommentID = document.getElementById('LastCommentID').getAttribute('value');

    since LastCommentID produces a null value and doesn't exist. you get an error.

    I don't know if this produces the correct results, but it gets rid of the errors and pops something on the screen.

    change line 21 to this.

    var lastCommentID = document.getElementById('latest').getAttribute('value');

    @r_j will probably have a different solution :wink:

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited September 2014

    or maybe this

      if (document.getElementById('LastCommentID') ){
                var lastCommentID = document.getElementById('LastCommentID').getAttribute('value');
           }
    

    or

       if (document.getElementById('latest') ){
               var lastCommentID = document.getElementById('latest').getAttribute('value');
          }
    

    back to r_j - need to test for null anyway I think whatever the element.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Family affairs - I might not be able to look after that before wednesday


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @inno4du: I've uploaded a new version which should be working with Vanilla 2.1
    http://vanillaforums.org/addon/informnewcomments-plugin

    @peregrine: I'm quite surprised, but there is no LastCommentID containing the last comment id element any more, but I could have sworn it has been there in 2.1 also.

    Now there is a js array containing that information that I haven't seen before...


    peregrine
  • i try this it working for me but some times that error came again

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Could you look at the JavaScript console of your browser when it happens? Tell me the line and the error message, please.


  • peregrineperegrine MVP
    edited September 2014

    @r_j said:
    Now there is a js array containing that information that I haven't seen before...

    fwiw - just testing it, it seems to work for me without any js errors with the new changes you implemented in version 0.3 and pops up a correct count, when I use two browsers and 2 users on localhost and post to same discussion.

    just curious how did you get that clue for the definitions array and the variables.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I was just looking at the sites source for "LastCommentID" ;)


  • inno4duinno4du New
    edited September 2014

    no no some times i clear the cache but some times no need to clear cache. i want to solve that

Sign In or Register to comment.