We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    Hi there.

    I have &moderated=`0` in my snippet call, but when a comment is posted, a message saying that the comment will be reviewed still appears and the comment is saved unpublished. I would like the comments to be published straight away. Does anyone know what I might be doing wrong? Here is the snipped call I am using:

    [!Jot? &css=`1` &cssFile=`[~104~]` &subscribe=`1` &moderated=`0` &notify=`0` &subjectSubscribe=`Strictlyファンサイトフォーラムに新しいコメントが投稿されました。` &captcha=`0` &badwords=`{{JotBadWords}}` &bw=`1` &validate=`content:コメントを入力してください。` &postdelay=`15` &pagination=`10` &placeholders=`1` &output=`0` &canpost=`ForumUsers` &canedit=`ForumUsers` &canmoderate=`ForumModerators` &tplForm=`JotFormTpl` &tplComments=`JotCommentTpl` &tplModerate=`JotModerateTpl` &tplNav=`JotNavigationTpl` &tplSubscribe=`JotSubscribeTpl` &tplNotify=`JotNotifyTpl` &tplNotifyModerator=`JotNotifyModeratorTpl` !]
    


    The {{JotBadWords}} chunk is currently empty, so it’s not (or shouldn’t be) a bad word that is causing the comments not to be published. I am using Jot 1.1.4, but was also having this problem with Jot 1.1.2. Modx 0.9.6.1p2. PHP Version 5.2.4-2


      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 22851
      • 805 Posts
      As often happens, structuring my question in a way that is suitable for the forums helps me to work out what the problem was myself. It was the empty bad words chunk that was causing the problem.

      I noticed that the code in the jot class for parsing the bw argument uses explodes and implodes on the text to create the regexp it needs. These don’t handle the case of an empty string as might be expected though. A regexp that matches anything gets generated when the string is empty.

      I added a couple of bad words and the problem went away. I suggest the handling of this special case as a bug fix for the next version. If the bw string is empty, then $this->config["badwords"]["enabled"] could be set to false around line 222 of jot.class.inc.php.

      Cheers,

      Paul
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.