I’ve just moved a site to a new server and formit is no longer redirecting to the thankyou page, it just reloads the page but does save the form in formsave:
Does anyone know why this would stop working when I’ve simply moved to a new server ( have done 100 + moves with no issues.
Errors in the manager log:
[2022-03-17 16:19:55] (ERROR in xPDO::getService @ /home/customer/www/domain.com/public_html/core/xpdo/xpdo.class.php : 1235) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2022-03-17 16:19:55] (ERROR in modRestCurlClient::__construct @ /home/customer/www/domain.com/public_html/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2022-03-17 16:19:55] (ERROR @ /home/customer/www/domain.com/public_html/core/components/formit/src/FormIt/Hook/Email.php : 322) [FormIt] An error occurred while trying to send the email. Could not instantiate mail function.
Site is up to date, all extras are up to date and I’ve tried every php version from 7.3.33 up to 8.1.3
Any advice would be great ( all forms on the site have stoped redirecting ).
If you see a message that says, “Could not instantiate mail function,” it usually means that either your host has the mail() function turned off (many do) or that you are using a localhost install and there is no working mail server. In that case, one option is to use the MODX SMTP Systems Settings so that MODX will send the mail from an SMTP server (e.g., Gmail) where you have an account.
Unfortunately I can’t install Bob’s Quick Email as there is no download link in the extras and If I try to upload it from my desktop it just says “Unknown”
I have however resolved it by changing the below to a email address from the domain:
&emailFrom=`[[+email]]`
to &emailFrom=`a-domain-email-address.com`
I don’t get the “Download” button through the extras section as stated earlier, if I download it and try to upload the .zip file I just get an “Unknown” error
That’s crazy. Normally, that would only happen if your MODX version was < 2.0.
Is there anything relevant in the MODX error log?
Does the console show any JS errors in Dev Mode?
I’d suggest manually deleting all files in the core/cache directory, repairing all DB tables, and re-running setup (extracted from the exact same MODX version you’re running).
There was nothing in the error log or console and was not already installed, funny thing is that I’ve just tried this on my laptop and the download button shows , if I go back up to the office it doesn’t show, both running the same operating system and both using the latest version of chrome.
Clearing the cache with the CacheClear extra and trying incognito or private mode in the browser will rule out cache issues. I also install the Cache Killer Chrome add-on and turn it on when stuff like this happens.
It can also help to watch the Network tab (Ctrl-shift-i) as you run your program.