We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10191
    • 12 Posts
    I saw that there is a request an account ... but how can they login after they’ve received their account?
      • 10191
      • 12 Posts
      I’m getting this weird error when I use apostrophes with the comments:

      MODx encountered the following error while attempting to parse the requested resource:
      « Execution of a query to the database failed - You have an error in your SQL syntax near ’tanonymous 26Sep2006 12:21PM
      can’tanonymous 26Sep2006 12:21PM
      why can’t
      ’,content) WHERE parent=’48’ AND alias=’usrcmt-48’
      [Copy SQL to ClipBoard]
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Where are you trying to do this?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 10191
          • 12 Posts
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Sorry, I meant in what snippet or manager function! But I see that you mean a front-end commenting snippet. Is this the UserComments snippet that comes with the MODx installation?

            The error is caused because the POST value is being inserted into the database (the site_content table) without being properly escaped. Not only does this cause your error, but it leaves the database vulnurable to sql injection attacks. Any time anything is inserted into the database, it should be run through a $modx->db->escape() first.

            I would strongly encourage you to use this instead http://modxcms.com/Jot-998.html. It is much more powerful and flexible, and does in fact properly secure the data before insertion.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 10191
              • 12 Posts
              you peeps at modx are increibly quick and helpful, thanks you