• jot.html placeholders not doing anything?#

  • The Man Can! Reply #1, 4 years, 11 months ago

    Reply
    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 and it's fine. If I do 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 and 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.


  • myan24 Reply #2, 4 years, 10 months ago

    Reply
    I can't help, but I can confirm I'm having exactly the same trouble. Did you get this sorted?


  • Errant Reply #3, 4 years, 10 months ago

    Reply
    I have same problem too. Don't know the reason (was too lazy to search for it ), 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 :]


  • YankeeDeuce Reply #4, 4 years, 10 months ago

    Reply
    [[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.


  • myan24 Reply #5, 4 years, 10 months ago

    Reply
    The order of output and placeholders doesn't seem to make any difference, but calling the snippet uncached does. Works! Thanks man!!



  • er16004 Reply #6, 4 years, 10 months ago

    Reply
    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+]


  • The Man Can! Reply #7, 4 years, 10 months ago

    Reply
    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.


  • MEGU Reply #8, 4 years, 7 months ago

    Reply
    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


  • foniksonik Reply #9, 4 years, 3 months ago

    Reply
    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...


  • The Man Can! Reply #10, 4 years, 3 months ago

    Reply
    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.