We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    I've got a site where I'd like to use the FormItSaveForm hook on some forms. I've used it elsewhere successfully, but on this site I'm getting this error when the form is submitted.
    Fatal error: Call to undefined method FormItForm_mysql::generatePseudoRandomHash() in /home/content/xx/xxxxxx/html/core/cache/includes/elements/modsnippet/19.include.cache.php on line 114
    Snippet 19 is FormItSaveForm. The Modx error log is clear.

    Modx 2.5.4
    FormIt 2.2.11

    Any ideas on what's happening? [ed. note: terrybarth last edited this post 7 years, 3 months ago.]
      • 38783
      • 571 Posts
      As this is referring to a file in the cache it might be worth clearing the cache. Preferably I would normally do this via FTP, rather than using the Manager, as the manager does not always completely clear the cache.
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 36551
        • 416 Posts
        Yep, I've cleared the cache manually several times.

        No Change. Fatal error persists until I remove the hook from the form.
          • 40400
          • 3 Posts
          Quote from: terrybarth at Jan 19, 2017, 03:34 AM
          Yep, I've cleared the cache manually several times.

          No Change. Fatal error persists until I remove the hook from the form.

          Same error for me. Tried to wipe the cache with ftp and after removing the hook the error is gone. Might have something to do with the latest changes in formit-2.2.11-pl

          - Add 'hash' field to FormItSaveForm to allow updating of previously saved forms (PR #94)



          i also can not review the last saved forms in my admin panel, another error appear in the firefox development console:

          SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data[Weitere Informationen]  forms.grid.js:25:25
          	FormIt.grid.Forms/<.columns<.renderer http://www.xxxxxxx/assets/components/formit/js/mgr/widgets/forms.grid.js:25:25
          




          I found the problem
          Try to reinstall the Extra Formit in manager. I had serveral "could not copy file" errors in the window.

          If you have the same errors, deleted the entire folder /core/components/formit and then try again to reinstall the formit Extra in manager. Now you shouldn't have any errors during the installation except "duplicate hash column" or something like that.
          It seems that sometimes the rights get messed up during the update on some servers. [ed. note: onsite.org last edited this post 7 years, 2 months ago.]