We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    I have a problem with Jot on a site of a client.

    They have some newspages and want their visitors be able to comment, after logging in.

    For login I use the WebLogin snippet and for registration WebSignup.

    In the newspages template I use these calls:
    [!Jot? &subscribe=`0` &action=`comments` &pagination=`10`!]
    [!Jot? &subscribe=`0` &action=`form` &tplForm=`jotForm`&canpost=`webusers` &canmoderate=`superusers` &badwords=`((jotBadwords}}` &bw=`2`!]
    

    After logging in I get the form, but after submitting it, Jot only shows the name of the user and ’new comment’, nothing else.

    When I look in the database, there are no entries at all.

    For an example you can take a look at http://dsov.nl/article-bericht-van-de-voorzitter-trots.htm

    This site uses modx 0.9.6.1p2 (yes I know, it should be upgraded, but that’s not my decision to make)
    Upgraded to Jot 1.1.4
    Installed PHx 2.1.3 (just to be sure)
    PHP 4.4.9
    MySQL 4.1.21

    Whatever I try, it just isn’t working. :’(

    Actually it’s the same solution I used for the blog on my own site: http://webenet.nl/webeblog.html

    I would really appreciate some help with this problem.

    Thanks
      • 16278
      • 928 Posts
      When I look in the database, there are no entries at all.
      - do you mean that a record is created for the comment, but the content is not stored in it? Otherwise, where do the user names come from?
      What does jotForm look like? Do the names of the fields need to given in a &customfields parameter, if they are different from the default ones?
      smiley KP
        • 34162
        • 1 Posts
        In the jot_content table there’s only a subject ’new comment’ and the id of the user is stored. The actual ’subject’ and ’content’ are not stored.

        This is my jot form:
        <a name="jf[+jot.link.id+]"></a>
        <h3>[+form.edit:is=`1`:then=`Commentaar wijzigen`:else=`Commentaar toevoegen`+]</h3>
        <div class="lists">
        <ul>
                <li>Verplichte velden zijn aangegeven met <b>*</b>.</li>
        </ul>
        </div>
        [+form.error:isnt=`0`:then=`
        <div class="jot-err">
        [+form.error:select=`
        &-3=Je commentaar is al verzonden.<br /> Mogelijk heb je voor een tweede keer op Verzenden geklikt.
        &-2=Je commentaar is afgewezen.
        &-1=Je commentaar is opgeslagen.<br />Het wordt eerst nagekeken voordat het gepubliceerd wordt.
        &1=Je commentaar is al verzonden.<br />Mogelijk heb je voor een tweede keer op Verzenden geklikt.
        &2=De ingevoerde beveiligingscode is onjuist.
        &3=Je kunt maar eenmaal per [+jot.postdelay+] seconden verzenden.
        &4=Je commentaar is afgewezen.<br />Mogelijk heb je een woord gebruikt dat niet is toegestaan.
        &5=Niet alle verplichte velden zijn ingevuld
        `+]
        </div>
        `:strip+]
        [+form.confirm:isnt=`0`:then=`
        <div class="jot-cfm">
        [+form.confirm:select=`
        &1=Je commentaar is gepubliceerd
        &2=Je commentaar is opgeslagen.<br />Het wordt eerst nagekeken voordat het gepubliceerd wordt.
        &3=Commentaar opgeslagen
        `+]
        </div>
        `:strip+]
        <form method="post" action="[+form.action:esc+]#jf[+jot.link.id+]" class="jot-form">
                <fieldset>
                <input name="JotForm" type="hidden" value="[+jot.id+]" />
                <input name="JotNow" type="hidden" value="[+jot.seed+]" />
                <input name="parent" type="hidden" value="[+form.field.parent+]" />
        
                [+form.moderation:is=`1`:then=`
                        <div class="jot-row">
                                <b>Gemaakt op:</b> [+form.field.createdon:date=`%a %B %d, %Y at %H:%M`+]<br />
                                <b>Gemaakt door:</b> [+form.field.createdby:userinfo=`username`:ifempty=`[+jot.guestname+]`+]<br />
                                <b>IP adres:</b> [+form.field.secip+]<br />
                                <b>Gepubliceerd:</b> [+form.field.published:select=`0=Nee&1=Ja`+]<br />
                                [+form.field.publishedon:gt=`0`:then=`
                                        <b>Gepubliceerd op:</b> [+form.field.publishedon:date=`%a %B %d, %Y at %H:%M`+]<br />
                                        <b>Gepubliceerd door:</b> [+form.field.publishedby:userinfo=`username`:ifempty=` * `+]<br />
                                `+]
                                [+form.field.editedon:gt=`0`:then=`
                                        <b>Gewijzigd op:</b> [+form.field.editedon:date=`%a %B %d, %Y at %H:%M`+]<br />
                                        <b>Gewijzigd door:</b> [+form.field.editedby:userinfo=`username`:ifempty=` * `+]<br />
                                `+]
                        </div>
                `:strip+]
        
                [+form.guest:is=`1`:then=`
                        <label for="naam">Naam:<br />
                        <input class="inputBox" tabindex="[+jot.seed:math=`?+1`+]" name="naam" id="naam" type="text" size="40" value="[+form.field.custom.name:esc+]" />
                        </label>
                `:strip+]
        
                <label for="onderwerp">Onderwerp:<br />
                <input class="inputBox" tabindex="[+jot.seed:math=`?+3`+]" name="onderwerp" id="onderwerp" type="text" size="40" value="[+form.field.title:esc+]" />
                </label>
                <label for="commentaar">Commentaar: *<br />
                <textarea class="inputBox" tabindex="[+jot.seed:math=`?+4`+]" name="commentaar" id="commentaar" cols="50" rows="5">[+form.field.content:esc+]</textarea>
                </label><br />
        
          [+jot.captcha:is=`1`:then=`
                        <div style="width:150px;margin-top: 5px;margin-bottom: 5px;"><a href="[+jot.link.current:esc+]"><img src="[(base_url)]manager/includes/veriword.php?rand=[+jot.seed+]" width="148" height="60" alt="Als je de code niet goed kunt lezen, klik dan op de code zelf om een nieuwe te tonen." title="Als je de code niet goed kunt lezen, klik dan op de code zelf om een nieuwe te tonen." style="border: 1px solid #ff7700" /></a></div>
                        Beveiligingscode:<br /><input class="inputBox" type="text" name="vericode" style="width:150px;" size="20" /> 
                `:strip+]
        
                <div style="float:right;width: 100px;"></div>
                <p> </p>
                <input class="Form_button" tabindex="[+jot.seed:math=`?+5`+]" name="submit" type="submit" value="Verzenden" />
                [+form.edit:is=`1`:then=`
                        <input class="Form_button" tabindex="[+jot.seed:math=`?+5`+]" name="submit" type="submit" value="Annuleren" onclick="history.go(-1);return false;" />
                `+]
                </fieldset>
        </form>
        


        Actually it’s the same setup I use for the blog on my own site and there it works perfectly.

        In the meantime my client switched to a new host. This is the new config:
        Upgraded to modx 0.9.6.3
        Jot 1.1.4
        PHx 2.1.3
        PHP 5.2.10
        MySQL 5.0.67

        Still same problem though sad

          • 34162
          • 1 Posts
          Just solved the problem.

          I copied the code from the chunk.form.inc.html in the templates directory of Jot and translated that into Dutch.

          Now everyting works fine smiley

          @kp52: thanks for trying to help. Really appreciate it!