We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29635
    • 361 Posts
    I’m guessing this is a really stupid mistake on my part, but I cannot get the [+jot.html+] placeholders to work for the life of me.

    My call (complete just in case, line breaks for readability):

    [!Jot? &subscribe=`1` &subjectSubscribe=`[Gateway] Comment subscription for "[*pagetitle*]"` 
    &captcha=`1` &badwords=`{{commentBadWords}}` &bw=`2` &css=`1` 
    &cssFile=`assets/templates/gateway.jot.css` 
    &sortby=`createdon:a` &numdir=`0` 
    &guestname=`anonymous` &postdelay=`6` &pagination=`0` 
    &placeholders=`1` &output=`0` &debug=`0` 
    &tplForm=`commentsForm` &tplComments=`commentsComment` &customfields=`name` !]
    
    [+jot.html.moderate+]
    [+jot.html.comments+]
    [+jot.html.form+]
    [+jot.html.navigation+]
    


    Generates nothing. If I do placeholders=0 and output=1 it’s fine. If I do debug=1 it looks as if it should be working:

    jot.html.comments = <a name="jcc9632ae882"></a>
    
    <div class="commentRow jot-row-alt ">
        <div class="jot-mod">
            
            
        </div><!-- .jot-mod -->
    
        <div class="commentTitleRow">
            <span class="commentAuthor">
    etc...
    


    But I’m totally clueless as to why output=0 and placeholders=1 doesn’t work.
    I’m using 1.1.2.

    Thoughts? I’ve been fighting this on and off for 2 weeks with no progress.
    Thanks.
      Need MODx Ecommerce? Try FoxyCart!
      • 20751
      • 122 Posts
      I can’t help, but I can confirm I’m having exactly the same trouble. Did you get this sorted?
        • 9053
        • 18 Posts
        I have same problem too. Don’t know the reason (was too lazy to search for it wink ), but one possible quick workaround is to modify jot parser, in assets/snippets/jot. Not very elegant or secure way, of course. Plus you need some basic knowledge in PHP or a couple of logic :]
          "Sorry for my english"
          • 33033
          • 43 Posts
          [[Jot? &customfields=`name,email` &subscribe=`0` &pagination=`10` &badwords=`{{Badwords}}` &canmoderate=`Admins` 
          &sortby=`createdon:a` &numdir=`0` &tplComments=`JotComments` &output=`0` &placeholders=`1` &captcha=`2` ]]
          [+jot.html.navigation+]
          [+jot.html.comments+]
          [+jot.html.moderate+]
          [+jot.html.form+]
          

          Here is the call I am using (line breaks for readability as well), works for me. Only thing I can see that’s different really is I have &output=`0` before &placeholders=`1` and my call is uncached.
            • 20751
            • 122 Posts
            The order of output and placeholders doesn’t seem to make any difference, but calling the snippet uncached does. Works! Thanks man!!

              • 8960
              • 150 Posts
              I just tried YankeeDeuce’s code, which didn’t work until I removed the `output` & `tplComments` calls. I left mine uncached, but I’m not sure that mattered. Here’s my code that worked for me (which was really Yankee’s code):

              [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`4` &badwords=`{{Badwords}}` &canmoderate=`Site Admins` &sortby=`createdon:a` &numdir=`0` &placeholders=`1` &captcha=`2` !]
              [+jot.html.navigation+]
              [+jot.html.comments+]
              [+jot.html.moderate+]
              [+jot.html.form+]
                • 29635
                • 361 Posts
                I was having no luck, regardless of whether it was called cached or uncached, until I tried moving the Jot call out of the chunk and into my template.

                So, this didn’t work:
                Template( Chunk( Jot + Placeholders ) )

                And this doesn’t work:
                Template( Placeholders + Chunk( Jot ) )

                But this does work:
                Template( Jot + Chunk( Placeholders ) )

                And so does this:
                Template( Jot + Placeholders )

                Hopefully that makes sense. Basically, it looks like Jot can’t be in a chunk with the placeholders. Not sure if this is a bug or a recursion limitation in the parser, but I’m glad I figured it out. (And I’m glad that the uncached call worked for others.)

                Odd.
                  Need MODx Ecommerce? Try FoxyCart!
                  • 19033
                  • 892 Posts
                  Dear all,
                  and I thank very much your great work, Jot!

                  I have also same trouble.
                  I want to confirm about this trouble.

                  I have installed PHx plugin.
                  And for example, I write as following.
                  [!Jot? &output=`0` &placeholders=`1`!]
                  [+jot.html.comments+]
                  [+jot.html.form+]


                  In this case, nothing is displayed.

                  NEXT:
                  Invalidate PHx plugin.
                  Write as follwing.
                  [!Jot? &output=`0` &placeholders=`1`!]
                  [+jot.html.comments+]
                  [+jot.html.form+]

                  Each Items are displayed.

                  NEXT2:
                  Validate PHx plugin.
                  Write as follwing.
                  [[Jot? &output=`0` &placeholders=`1`]]
                  [+jot.html.comments+]
                  [+jot.html.form+]

                  Each Items are displayed.

                  From these result, when PHx is valid, "Jot" must call with cache-style. ( = [[...]]), I think.
                  Is this specifications?

                  I would like to save document with cache.
                  So I will need to call Jot with non-cache-style( = [!...!]).
                  But when PHx plugin is valid, I can not use "[+jot.html.etc+]", with the above.
                  Can I solve this problem?

                  Sincerely yours,
                  ---*---*---*---*---*---
                  P.S.
                  about version:
                  * MODx 0.9.5
                  * Jot 1.1.2
                  * PHx 2.1.2
                    • 9941
                    • 65 Posts
                    I came to the same conclusion as Megu... this is an old thread, relatively... has anyone solved this? or are we waiting for an official update to either Jot or PHX?

                    Maybe just remove the PHX parser class from JOT when PHX is installed? could be a conflict of some sort...
                      • 29635
                      • 361 Posts
                      Only way I’ve been able to get around this is to play around with the page cache settings (uncached, I think) and the snippet cache settings. Not the best, but it has worked whenever I’ve run into this issue (which is almost every time I use Jot). I doubt we’ll see any movement on a fix for this before 0.9.7, but I could be wrong.
                        Need MODx Ecommerce? Try FoxyCart!