We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hello,

    I have a problem with the "count-comments".

    It worked until yesterday but today it does not work. Somehow the "[!Jot?&docid=`[+id+]`&action=`count-comments`!]" is not parsed and I get the text in the HTML page.

    In html page I get this:
    Comments ([!Jot?&docid=`51`&action=`count-comments`!])


    I looked in the code and I found this line "switch ($this->config["mode"]["passive"])"
    At first I thought it was this line who is causing problem but it does not because the "comments" command is working

    Maybe I did something wrong.

    Here is the output for the nl_blog chunk:

    <div class="nl_summaryPost">
      <h3><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h3>
      <div class="nl_info" >By <strong>[+author+]</strong> on [+date+]. <a  href="[~[+id+]~]#commentsAnchor">Comments
      ([!Jot?&docid=`[+id+]`&action=`count-comments`!])</a></div>
      [+summary+]
      <div id="nl_comments_[+id+]" style="display: none;">
     [[Jot?&docid=`[+id+]`&action=`comments`]]
      </div>
      <p class="nl_link">[+link+]</p>
    </div>


    Thx
      • 5340
      • 1,624 Posts
      I found the problem.

      I changed the [! to [[. But shouldn’t it work in both ways?
        • 7923
        • 4,213 Posts
        Currently MODx can’t handle snippet calls inside a template chunk if both are in same cache mode..

        Eg. if Ditto is called [!Ditto?tpl=`tpl`!], in the tpl chunk you can’t use uncached snippet calls [!snippet!], they have to be [[snippet]] and vice versa.


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 8931
          • 5 Posts
          thanks doze! I was having the same issue with my post. I was calling the Jot snippet as
          [[Jot? &placeholders=`1` &output=`0` &pagination=`10` &captcha=`1` &canmoderate=`Jot Moderators` &badwords=`{{myBadwordList}}` &bw=`1`]]
          in my template file.

          Whenever I tried to add comments to a paged based on that template it simply didn’t add them. I then unchecked the ’Cacheable’ option on the page based on the template using the Jot call like specified above, and by unchecking that it worked! Now it adds comments with no problems at all!