We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18339
    • 14 Posts
    I need some help troubleshooting a FormIt call. The form is rather large and a lot of fields are marked required.

    The following FormIt call redirects to the "redirect" resource even if the form is submitted blank. The e-mail is sent, and no validation takes place.

    [[!FormIt?
       &hooks=`spam,email,redirect`
       &emailTpl=`AdmissionFormEmail`
       &emailFrom=`[email protected]`
       &emailTo=`[email protected]`
       &emailSubject=`Bluefield Prep Admissions Form`
       &submitVar=`save`
       &redirectTo=`49`
       &validate=`studentfirstname:required,
          studentlastname:required,
          studentgender:required,
          studentdob:required,
          studentnotes:stripTags,
          addressstreet:required,
          addresscity:required,
          addressstate:required,
          addresscountry:required,
          addresszip:required,
          studentemail:email:required,
          studentphone:minLength=^10^:required,
          studentcountryofbirth:required,
          studentcitizenship:required,
          expectgraduate:required,
          gradelevel:required,
          school:required,
          g1relationship:required,
          g1lastname:required,
          g1firstname:required,
          g1email:email,
          g1phone:minLength=^10^:required,
          operatingsystem:required,
          additionalinfo:stripTags`
    ]]
    


    I also seem to be getting a lot of entries in the MODx Error Log while testing this form. I don’t know if the following is related:

    
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /home2/onebigc1/public_html/00sites_bluefieldprep/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
    [2011-06-29 07:43:19] (ERROR @ /manager/index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modActionDom.rank' in 'order clause'
    )
    
    [2011-06-29 07:48:07] (ERROR @ /manager/index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modActionDom.rank' in 'order clause'
    )
    
    
    • Those errors are related to TinyMCE which has been fixed in one of the latest releases IIRC.

      Try updating TinyMCE to the latest to get rid of that.

      Now that does give another question - do you have this formit form in the content field of a resource which uses TinyMCE?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 18339
        • 14 Posts
        No, the resource has "Rich Text" turned off.

        I’m upgrading the site now from 2.0.7 to latest in the hopes it’ll fix the problem.

        I love MODx, but I’m starting to get annoyed that FormIt, especially, doesn’t produce errors when something goes wrong.
        • Make sure there’s no addons that break the mgr when moving to 2.1 by updating addons both before and after the upgrade.

          What happens if you put the &validate param before the email props?
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 18339
            • 14 Posts
            Nothing changes when I move the email parameters.

            I can’t upgrade plugins before the upgrade because the new version is uploading now.
            • Whenever I have issues with FormIt, 9/10 times it’s because it’s (for whatever reason) not getting the properties. Which is why if you put the validate property to be the first or second you can see if that changes anything and perhaps spot an invalid character that’s very easy to overlook.

              I’m not sure if your definition of moving the email props is the same as putting the validate property before others.

              If your manager breaks after the update, check the error log (core/cache/error.log) for details on the ID of the plugin that’s breaking it and disable it via phpmyadmin and empty the core/cache folder manually.

                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 18339
                • 14 Posts
                I put the email properties after the validation properties. I’d show you but since a new version of MODx is currently uploading I get this when I try to go into the manager:

                Fatal error: Undefined class constant 'OPT_CACHE_FORMAT' in /home2/onebigc1/public_html/00sites_bluefieldprep/manager/controllers/default/header.php on line 12
                
                • Yeah, using the manager during upgrade doesn’t work.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 18339
                    • 14 Posts
                    The nightmare continues. After uploading 2.1.1-pl and running setup, going to Package Management in the Manager brings up a blank pane where the package manager should be (the top menus and the left site tree appear).

                    Cleared cache, flushed sessions, ran setup again, same thing. WTF is going on?
                      • 18339
                      • 14 Posts
                      Oh yeah, the site’s hosed now too. All public pages say:

                      Fatal error: Call to undefined method modX::getUserDocGroups() in /home2/onebigc1/public_html/00sites_bluefieldprep/core/components/wayfinder/wayfinder.class.php on line 434