We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22446
    • 181 Posts
    Could someone help me understand why my Jot callout isn’t posting. I have built a templates for the &tplForm and &tplComments. There are custom fields for the reporter, snowmobile club, snow depth and trail conditions. Can someone help me out where my callouts aren’t working correctly or posting.

    Jot Callout inside a chuck called out on the proper document
    <div id="commentsAnchor">
    [!Jot? &tplForm=`jot_form` &tplComments=`jot_comment` &subscribe=`1` &pagination=`10`  &sortby=`createdon:d` &numdir=`0` &placeholders=`1` &output=`0` &canpost =`Users` &canmoderate=`Users` &cssFile=`website/css/jot.css`!]
    </div>
    [+jot.html.comments+]
    [+jot.html.navigation+]
    [+jot.html.form+]
    [+jot.html.moderate+]


    &tplForm
    <form method="post" action="[+form.action:esc+]#jf[+jot.link.id+]" class="jot-form">
    <fieldset>
    <div id="commentform">
    <label for="name[+jot.id+]">Reporter:<br /><input tabindex="[+jot.seed:math=``+]" name="reporter" type="text" size="50" value="[+form.field.custom.reporter:esc+]" id="reporter[+jot.id+]" /></label>
    <label for="name[+jot.id+]">Snowmobile Club:<br /><input tabindex="[+jot.seed:math=``+]" name="club" type="text" size="25" value="[+form.field.custom.club:esc+]" id="club[+jot.id+]"/></label>
    <label for="name[+jot.id+]">Trail Conditions:<br /><input tabindex="[+jot.seed:math=``+]" name="trailcond" type="text" size="25" value="[+form.field.custom.trailcond:esc+]" id="trailcond[+jot.id+]"/></label>
    <label for="name[+jot.id+]">Snow Depth:<br /><input tabindex="[+jot.seed:math=``+]" name="depth" type="text" size="25" value="[+form.field.custom.depth:esc+]" id="depth[+jot.id+]" /></label>
    <label for="content[+jot.id+]">Trail Report: *<br /><textarea tabindex="[+jot.seed:math=``+]" name="report" cols="75" rows="8" id="report[+jot.id+]">[+form.field.content:esc+]</textarea></label><br />
    <input tabindex="[+jot.seed:math=``+]" name="submit" type="submit" value="[+form.edit:is=`1`:then=`Save Comment`:else=`Post Comment`+]" />
    <div class="edited">
    [+form.edit:is=`1`:then=`<input tabindex="[+jot.seed:math=``+]" name="submit" type="submit" value="Cancel" onclick="history.go(-1);return false;" />`+] 
    </div>
    </fieldset>
    </form>
    


    &tplComments
    <div class="comment">
    <div class="header">
    <div class="titles">
    <strong>Reported by: </strong>[+comment.custom.reporter:esc+]<br />
    <strong>Club Name: </strong>[+comment.custom.club:esc+]<br />
    <strong>Snow Depth: </strong>[+comment.custom.depth:esc+]<br />
    <strong>Trail Conditions: </strong>[+comment.custom.trailcond:esc+]<br /></div>
    <div class="date">[+comment.createdon:date=`%a %B %d, %Y, %H:%M`+]<br />
    [+jot.moderation.enabled:is=`1`:then=`<a href="[+jot.link.delete:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to delete this comment?')" title="Delete Comment"><img src="[(base_url)]manager/media/style/MODxCarbon/images/icons/event3.png" width="16" height="16" alt="Delete Comment" border="0" /></a>[+comment.published:is=`0`:then=`<a href="[+jot.link.publish:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to publish this comment?')" title="Publish Comment"><img src="[(base_url)]manager/media/style/MODxCarbon/images/icons/add.png" width="16" height="16" alt="Publish Comment" border="0" /></a>`+]
    [+comment.published:is=`1`:then=`<a href="[+jot.link.unpublish:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to unpublish this comment?')" title="Unpublish Comment"><img src="[(base_url)]manager/media/style/MODxCarbon/images/icons/delete.png" width="16" height="16" alt="Unpublish Comment" border="0" /></a>`+]	`:strip+]</div>
    </div>
    <hr>
    <div class="report">[+comment.content:wordwrap:esc:nl2br+]</div>
    <div class="edited">[+comment.editedon:isnt=`0`:then=`<span class="jot-editby">Last Edit: [+comment.editedon:date=`%B %d, %Y, %H:%M`+] by [+comment.editedby:userinfo=`username`:ifempty=` * `+]</span> `+]</div>
    </div>


      • 7231
      • 4,205 Posts
      The problem seems to be with the &output=`0` parameter. Turning it off seems to make things work but the placeholders dont seem to be working. Not sure why this is.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 7231
        • 4,205 Posts
        Do you have PHx installed as a plugin? If so this could be the problem. I turned PHx plugin off on my test site and the placeholders with output=`0` worked as expected.

        It seems that another workaround is to set the page (document) to be uncached and then use [[Jot...]] rather than [! !]

        Here is a discusion about this:
        http://modxcms.com/forums/index.php/topic,12828.msg144916.html#msg144916
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 22446
          • 181 Posts
          Thanks for the response. I do not have phx installed. I played around with what you had said and I can get it to post. I don’t get any content though to show up in my custom fields or the content field. I get a blank post. Any suggestions on why these are not working. There must be something in my comments template. Is there something that I am overlooking?
            • 22446
            • 181 Posts
            I figured it out thanks.