Skip Navigation

[Gelöst] AJAX Error When Sending Test E-Mail Notification

This support ticket is created vor 6 Jahren, 6 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 21 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von aaronM-9 vor 6 Jahren, 4 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#905882
test.jpg

Do you know what might be causing the error being displayed in the attached screenshot to be happening? I am trying to test an e-mail notification on an edit-user form. It uses a form field to get the e-mail address and the error is happening even when I just put the text "test" in the content of the e-mail.

Form is the user-signup-subscriber form.

- Aaron

#905973

Hello,

In your screenshot, there is 500 error message, so there are PHP errors occur in your website when send the test email, please try this:
1) In case it is a compatibility problem, deactivate other plugins and switch to wordpress default theme, and test again
2) Enable PHP debug mode, copy and paste the debug logs here
PHP Debugging
In case you think that Types or Views are doing something wrong (what we call a bug), you should enable PHP error logging. Again, edit your wp-config.php file and add the following:

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
This will produce a file called ‘error_log.txt’ in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, user www-data).
https://toolset.com/documentation/user-guides/debugging-types-and-views/

#906462

I tried deactivating any plugins that I've recently installed and the problem is still happening. I can also confirm that the issue is happening on multiple forms, even if they have e-mail notifications that function properly on the front-end. The theme I'm using is the same theme I've been using all along, even when the feature was working. I added the debug code and the only error message that's coming up is the following, but it happens on many pages so I doubt it's related:

[30-May-2018 20:37:02 UTC] PHP Notice: Undefined index: SCRIPT_NAME in /home/aaronmckeon/public_html/wp-includes/load.php on line 100

- Aaron

#906526
temp2.jpg
temp.jpg

Hi Luo,

I think this problem is bigger than test e-mail notifications. I just went to update some content using the Content Layout Editor and when I clicked "Save and Close" it gave me an ajax error (see attached screenshots). I had no choice but to click Cancel. The interesting thins is that it did save the content - it just didn't close the content editor. Nothing in the site error log.

I'm going to have to dig deeper into this problem since it's now affecting my ability to easily edit content. Any help you could provide would be appreciated, but I think I'm going to have to pick it up in the morning. Thanks.

- Aaron

#906570

Thanks for the details, I am downloading the duplicator package from your website, trying to duplicate the same problem and debug it in my localhost, will feedback if there is anything found

#906695
Layout-Editor.JPG
test-email.JPG

Here is what I found,
1) With your database dump file and the latest version of Toolset plugins, there isn't similar problem.
I can send the test email without any error, see screenshot test-email.JPG, I get he message:
Mail sent succesfully

2) the Content Layout Editor issues
Same as above, there isn't similar problem in my localhost, no AJAX error, see screenshot Layout-Editor.JPG

So it should be a compatibility/server problem, please try as I mentioned above:
deactivate other plugins and switch to wordpress default theme, and test again, try to locate the problem plugin/theme

#907175

Hi Luo,

I have disabled all plugins besides the Toolset suite and have reverted back to the Twenty Seventeen theme and the problem is still occurring. I also rolled back any changes to wp-config.php I've made (which was to add debugging and to disable WP initiation of cron jobs). The only change I can remember making to the server recently was to initiate WP cron jobs. Do you have any other ideas on why this would be happening?

I'll hold on switching plugins back on in case you want to go in and look. When I disable all my plugins and revert my theme I have to do some reconfiguring when I turn everything back on, so I'd rather not have to do it twice. Thanks.

- Aaron

#907204

I just had a conversation with the support people who are hosting my site. There is nothing they can see coming up in the logs besides this one, but I don't think it's related and the timestamps don't match up:

[31-May-2018 21:28:01 UTC] PHP Notice: Undefined index: SCRIPT_NAME in /home/aaronmckeon/public_html/wp-includes/load.php on line 100

They are wondering if there could be a PHP version incompatibility, which I also doubt, but I figured I'd raise it just in case. The server I'm on is running 7.0. They also think the "There was an error during the ajax request, make sure the data you send are in json format." is the best clue to go on but I'm not sure how else to chase it down.

I also tried deleting the cron job I had added, which is the only change I can think of that I've made to the server recently, and it had no effect. Thanks in advance for any further support you can offer.

- Aaron

PS: One more thing to add. I have another support ticket open related to Toolset not thinking I have a valid license, which was recently escalated. It hasn't actually stopped me from being able to use all the plugins but I'm only mentioning it just in case there is any way they are related issues: https://toolset.com/forums/topic/registration-issue-following-upgrade-to-final-released-version/

#907259

Q1) Do you have any other ideas on why this would be happening?
In my opinion, since there isn't similar problem using your database dump file in my localhost, it should be a compatibility/server problem.

Q2) is the best clue to go on but I'm not sure how else to chase it down?
According to our document:
https://toolset.com/toolset-requirements/
PHP 5.3 and above (including PHP 7).

So PHP version7 should not be the problem, but there are some additional requirements:

If it is needed, I can setup a demo site with your database dump file + the latest version of Toolset plugins for you.

#907434

Hi Luo,

Yes, that would be helpful if you don't mind. Thanks.

- Aaron

#908070

Thanks fore the patience, I have been able to duplicate the same problem in our discover-wp.com:
and the problem can not be duplicate in my localhost, so I have escalated this thread to our 2nd tier supporters, I will update this thread if there is anything news.

#908118

Many thanks. It's not really holding me up from developing at the moment - just more of a nuisance from what I can tell - in case they're trying to stack priorities on various requests. Cheers.

- Aaron

#908614

Thanks for the feedback, there are lots of escalated tickets recently, I am waiting for the feedback from our 2nd tier supporters, I will update this thread if there is anything news.

#908647

Here is the hotfix from our developers:
https://toolset.com/errata/test-emails-for-notifications-on-post-forms-might-fail/

Please test it and feedback if it is fixed or not

#908909

Hi Luo,

Unfortunately I'm still getting the error even after replacing those two files.

- Aaron