Sterc / FormIt

A dynamic form processing Snippet for MODX Revolution
https://docs.modx.com/current/en/extras/formit
33 stars 58 forks source link

Formit 4.0 - Uncaught Error: Class #161

Closed jdaehne closed 6 years ago

jdaehne commented 6 years ago

After updating to version 4.0 I get an error message with the "FormItAutoResponder" Hook.

If i leave the “email” input field empty. The hook can’t define a Address to send to. Then the error appears. If i input an email - FormItAutoResponder works fine.

Shouldn't the Hook just be ignored if there is no email to send the Autoresponder to?

Error message:

Fatal error: Uncaught Error: Class 'Sterc\FormIt\Hook\modX' not found in /htdocs/core/components/formit/src/FormIt/Hook/Autoresponder.php:94 Stack trace: #0 /htdocs/core/components/formit/src/FormIt/Hook.php(139): Sterc\FormIt\Hook\Autoresponder->process(Array) #1 /htdocs/core/components/formit/src/FormIt/Hook.php(106): Sterc\FormIt\Hook->load('autoresponder', Array, Array) #2 /htdocs/core/components/formit/src/FormIt/Request.php(382): Sterc\FormIt\Hook->loadMultiple(Array, Array) #3 /htdocs/core/components/formit/src/FormIt/Request.php(325): Sterc\FormIt\Request->runPostHooks() #4 /htdocs/core/components/formit/src/FormIt/Request.php(237): Sterc\FormIt\Request->postProcess() #5 /htdocs/core/cache/includes/elements/modsnippet/66.include.cache.php(44): Sterc\FormIt\Request->handle(Array) # in /htdocs/core/components/formit/src/FormIt/Hook/Autoresponder.php on line 94
mrhaw commented 6 years ago

I just experienced: Fatal error: Class 'Sterc\FormIt\modX' not found in /home/ ... /components/formit/src/FormIt/Validator.php on line 272

joeke commented 6 years ago

This should be fixed now with the new 4.0.1 release: https://modx.com/extras/package/formit

mrhaw commented 6 years ago

AWESOME WORK! Sweet! 💯