We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    You can still use 1.6.0 as the only thing missing is the pagination while i prep up the new release smiley
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 14281
      • 120 Posts


      it is this the problem you are looking for?
      see http://modxcms.com/forums/index.php/topic,4724.msg37274.html#msg37274

      The line number that you refer to (156) does not jive up with what I’m seeing in your file. The closest match that I’m seeing is on line 242, in a switch statement, where it says:

      if(!$modx->isMemberOfWebGroup($modgrp) && !$modx->checkSession) {
      			  return 'You are not allowed to delete comments';
      }


      I believe it includes the checkSession method because I made the change myself sometime back. I’ve made some other minor changes as well, but not nearly enough to throw the numbering off this much. So I’m wondering, is that the place you’re talking about? If so, I made the change and it’s still not working. I’ll take a look around your code and see if I can pinpoint the problem.

      Thanks.
        • 4195
        • 398 Posts
        Yes that’s the spot.

        I had the problem it was not deleting comments if a manager user was logged in because at the delete statement it would check only for the web user group.
          Armand Pondman
          MODx Coding Team
          :: Jot :: PHx
          • 33337
          • 3,975 Posts
          Man, my Replix went crazy on my local install :/

          I turned Captcha "ON", after submitted 1 comment, that comment went to various other documents, and its not showing-up in document tree also. I went to phpmyadmin, got a doc id and searched in document tree and documents are there.

          I tried to turn Captcha off, by omitting &captcha=`1` from the replix call, but in vain!

          Any idea what happened ? How to fix it .. sad

          For reference:
          my form chunk:
          <div class="rpx-error">
          [{onshow;block=div;when [{replix.error}]=1}]
          	The form code you entered was incorrect.
          </div>
          
          
          <form method="post" action="">
          	<input name="ReplixForm[{replix.tag}]" type="hidden" value="on" />
          	<div>
          	[{onshow;block=div;when [{replix.guestform}]=1}]
          	Name:<br />
          	<input name="name" type="text" size="40" value="[{post.name;if [{replix.error}]=1;else ''}]" /><br />
          	Email: (will not be displayed Public!)<br />
          	<input name="email" type="text" size="40" value="[{post.email;if [{replix.error}]=1;else ''}]" /><br />
          	URL:<br />
          	<input name="url" type="text" size="40" value="[{post.url;if [{replix.error}]=1;else ''}]" /><br />
          	</div>
          	Comment:<br />
          	<textarea name="message" cols="50" rows="8">[{post.message;if [{replix.error}]=1;else ''}]</textarea><br />
          	<div>[{onshow;block=span;when [{replix.captcha}]=1}]<h4>Form Code:</h4>
            <a href="[~[*id*]~]"><img align="top" src="manager/includes/veriword.php?rand= [{replix.cseed}]" width="148" height="60" alt="If you have trouble reading the code, click on the code itself to generate a new random code." style="border: 1px solid #003399"/></a><br />
            <br/><input type="text" name="formcode" style="width:150px" size="20" /></div>
          	<input name="submit" type="submit" value="Submit" />
          </form>
          

          Comment Display chunk:
          <form name="ReplixDelete[{replix.tag}]" method="post" action="">
          	[{onshow;block=form;when [{replix.moderate}]=1}]
          	<input name="ReplixDelete[{replix.tag}]" type="hidden" value="on" />
          	<input name="cid" type="hidden" value="" />
          </form>
          
          <div class="rpx-nav">[{onshow;block=div;when [{replix.page.total}]+-1}]
          <span><a href="[~[*id*]~][{replix.page.link}][{replix.page.current;ope=add:-1}]">Previous</a> | [{onshow;block=span;when [{replix.page.current}]+-1}]</span>
          Showing comments <b>[{replix.nav.start}]</b> to <b>[{replix.nav.end}]</b> of <b>[{replix.nav.total}]</b> 
          <span>| <a href="[~[*id*]~][{replix.page.link}][{replix.page.current;ope=add:+1}]">Next</a> [{onshow;block=span;when [{replix.page.current}]-+[{replix.page.total}]}]</span>
          </div>
          
          <div class="rpx-row [{onshow;if [{comment.uid}]=[{doc.createdby}];then 'rpx-row-author'; if [{comment.#;ope=mod:2}]=1;then 'rpx-row-alt'}]">
           <div class="rpx-comment">
            <div class="rpx-postnumber">[{comment.postnumber}]</div>
            <div class="rpx-mod">
             <a href="[~[*id*]~][{replix.link}]#" onclick="if(confirm('Are you sure you wish to delete this comment?')) { document.forms.ReplixDelete[{replix.tag}].cid.value='[{comment.id}]';document.forms.ReplixDelete[{replix.tag}].submit();}" title="Delete Comment"><img src="manager/media/images/icons/delete.gif" width="16" height="16" alt="Delete Comment" border="0" />[{onshow;block=a;when [{replix.moderate}]=1}]</a>
             </div>
             <div class="rpx-poster"><a href="[{comment.url}]" title="[{comment.url}]">[{comment.username;ifempty='[{comment.name;htmlconv=esc;ifempty=[{replix.guestname}]}]'}]</a></div>	
             <div class="rpx-message">[{comment.message}]</div>
           <div class="rpx-posttime"> [{comment.createdon;frm='dd.mm.yyyy hh:nn'}]</div>
            </div>
          
           <br class="clear" />
          </div>
          
          <div class="rpx-nav">[{onshow;block=div;when [{replix.page.total}]+-1}]
          <span><a href="[~[*id*]~][{replix.page.link}][{replix.page.current;ope=add:-1}]">Previous</a> | [{onshow;block=span;when [{replix.page.current}]+-1}]</span>
          Showing comments <b>[{replix.nav.start}]</b> to <b>[{replix.nav.end}]</b> of <b>[{replix.nav.total}]</b> 
          <span>| <a href="[~[*id*]~][{replix.page.link}][{replix.page.current;ope=add:+1}]">Next</a> [{onshow;block=span;when [{replix.page.current}]-+[{replix.page.total}]}]</span>
          </div>
          


          my replix call:

          [!Replix? &makefolder=`1` &sortorder=`0` &customfields=`name,email,url` &customname=`name` &guestname=`Guest` &tplForm=`tpl-replix-form` &tplComment=`tpl-replix-comments`!]
          


          Another thing I noticed, its just displaying 1 comment under original document at a time, if I delete that comment, older comment appears, but for other documents (on which I never posted a single comment) an empty comment displayed.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 33337
            • 3,975 Posts
            I just realized that I have several Event Log entries of this error:

            TinyButStrong Error in field [{post.name...}] : item 'name' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
            
            TinyButStrong Error in field [{post.email...}] : item 'email' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
            
            TinyButStrong Error in field [{post.url...}] : item 'url' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
            
            TinyButStrong Error in field [{post.message...}] : item 'message' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
            


            Is it related ?
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 4195
              • 398 Posts
              Quote from: zi at Jun 22, 2006, 04:37 AM

              I just realized that I have several Event Log entries of this error:

              TinyButStrong Error in field [{post.name...}] : item 'name' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
              
              TinyButStrong Error in field [{post.email...}] : item 'email' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
              
              TinyButStrong Error in field [{post.url...}] : item 'url' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
              
              TinyButStrong Error in field [{post.message...}] : item 'message' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
              


              Is it related ?

              No it’s not related.. I just noticed these warnings myself.. these are innocent notices, they can be disabled using ;noerr in the template.
                Armand Pondman
                MODx Coding Team
                :: Jot :: PHx
                • 33337
                • 3,975 Posts
                problem resolved!

                BIG Thanks to bS for his help.

                regards.

                zi
                  Zaigham R - MODX Professional | Skype | Email | Twitter

                  Digging the interwebs for #MODX gems and bringing it to you. modx.link
                  • 33337
                  • 3,975 Posts
                  bS, as I told you before that in this version ([Snippet] Replix 1.7.5 (upd 19-06)), the comment document is not showing up, well I traced a problem! (you got me digging into DB tongue )

                  The script is not setting isFolder field of the parent doc somehow sad.. fix please ?

                  regards.

                  zi
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 4195
                    • 398 Posts
                    Quote from: zi at Jun 23, 2006, 03:26 AM

                    bS, as I told you before that in this version ([Snippet] Replix 1.7.5 (upd 19-06)), the comment document is not showing up, well I traced a problem! (you got me digging into DB tongue )

                    The script is not setting isFolder field of the parent doc somehow sad.. fix please ?

                    regards.

                    zi

                    I guess something went wrong when your templates where not correct. To fix manually change isfolder to 1 or delete the comment documents from within PHPMyAdmin (so it will force a new document on pageview). and check again.

                    The snippet, for now, won’t correct isfolder to 1 after the comment document exists.
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 16610
                      • 634 Posts
                      I have a one odd problem: line breaks are not displaying right in comments. Line breaks are included as text,
                      , in comments not as xhtml tags.
                        Mikko Lammi, Owner at Maagit