Answers.Body: <p>I have seen this error occur on WordPress due to a false positive generated in WordFence security plugin.</p>
  
  <p>If that might be your issue, put WordFence Firewall back into "Learning Mode", try saving/testing a Mosaico template email again in Civi and - if that is the problem - then WordFence should Whitelist the action, and the error should disappear.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-31T15:26:15.560Z
Answers.Text: This worked for me. Thanks.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-22T21:53:45.597Z
Answers.Text: Helped me too, though a colleague later said " just try saving the mailing then go into wordfence find the relevant request and whitelist it. That way you are not disabling the functionality while it learns."
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-22T21:55:02.993Z
Answers.Text: There are some more detail instructions here: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/230#issuecomment-366775357
Answers.UserDisplayName: Luke Stewart
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-24T08:03:40.973Z
Answers.LastActivityDate: 2019-11-24T08:03:40.973Z
Answers.UserDisplayName: Marcus J Wilson
Answers.Body: <p>I've run into this error for three reasons:</p>
  
  <p>1: I copied and pasted in text and there was a special character in there that CiviCRM did not like. I figured out which one it was by pasting in only pieces of the text and watching to see when it quit saving and instead gave me the error.</p>
  
  <p>2: I'd upgraded CiviCRM and the permissions weren't correct on some files (I'm logged in as root and therefore have to change owner/group when I upload).</p>
  
  <p>3: A modsecurity issue. My host was able to look at the logs and whitelist the URI that was causing the issue. Last time it was: /civicrm/ajax/rest</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-06T06:42:55.527Z
Answers.Text: Aha! This definitely helped....
  
  I was failing with new, blank (no template) mailings, so I didn't think it could be #1. 
  
  I hadn't upgraded since my most recent successful mailing, so I didn't think it could be #2. 
  
  My dev box doesn't use mod_security, so I didn't think it was #3, but your mention of "/civicrm/ajax/rest" reminded me that I had applied a small patch for REST.php that was provided by the developers of CiviMobileAPI as a proposed fix for a login issue on WordPress. I offered to test it a few days ago and I apparently forgot to revert! That was it. Thanks!
Answers.UserDisplayName: Mark Westergaard
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-07T00:41:55.417Z
Answers.Text: Yay! Glad to hear that I at least got your mind thinking in the right direction. Sometimes that's all it takes. :D
Answers.UserDisplayName: Jenni Simonis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-06T05:39:50.257Z
Answers.LastActivityDate: 2018-11-06T05:39:50.257Z
Answers.UserDisplayName: Jenni Simonis
Answers.Body: <p>I had this issue too and the solution was a twist on Jenni Simonis's <a href="https://civicrm.stackexchange.com/a/27205/75">answer</a> so I'll elaborate in case anyone else runs into it. </p>
  
  <p>The specific thing that fixed it for me was granting user &amp; group execute permissions on the wordpress file wp-admin/admin.php. </p>
  
  <p>I was getting a 403 forbidden error in the JS console on this file any time CiviCRM tried to take some kind of ajax action because it was trying to post to /civicrm/ajax/rest through admin.php but didn't have the right permissions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-29T12:18:20.380Z
Answers.Text: Welcome to CiviCRM.SE. The number next to a question or answer does not indicate its sequence, but the number of votes it has received; I have altered the reference in your post as a result. This is not a discussion forum, but a Q&A site, and if you are new to Stack Exchange, I would strongly recommend you take the site [tour] and review the [help].
Answers.UserDisplayName: choster
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-30T13:32:22.343Z
Answers.Text: thanks @choster :)
Answers.UserDisplayName: TraceElements
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-04T20:07:14.427Z
Answers.Text: I still have this issue on WordPress the error I'm getting in the chrome console is "POST https://www.example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/ajax/rest 500"jquery.min.js?r=p6mna:4 
  Anyone know what this can be? or how to fix it?
Answers.UserDisplayName: netzih
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-27T14:35:12.563Z
Answers.LastActivityDate: 2019-03-29T12:17:13.500Z
Answers.LastEditDate: 2019-03-29T12:17:13.500Z
Answers.UserDisplayName: TraceElements
Body: <p>CiviCRM 5.6.1, WordPress 4.9.8, PHP 7.1.22, MySQL 5.7.23, WordFence 7.1.16</p>
  
  <p>I just started getting this error when trying to create a mailing. It happens with Mosaico and traditional mailings. I previously saw this issue when first using the WordFence security plugin and found a discussion here suggesting to disable WordFence's XSS check, which I did with success until now. That was months ago. The option is still disabled and I even tried disabling WordFence entirely, but no luck. I haven't made any significant changes recently that I can think of. I had no problems with my last weekly mailing.</p>
  
  <p>I also checked with my hosting provider to see if they had made any mod_security rules changes. They hadn't. I don't see anything interesting in the logs. Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-06T01:38:50.700Z
Comments.Text: I am also seeing this error on my personal dev box. It's just a linux box in my closet, not hosted. It has basically the same configuration, minus the WordFence plugin.
Comments.UserDisplayName: Mark Westergaard
Tags: <wordpress><civimail><mosaico>
Title: CiviMail error: "Sorry an error occurred and your information was not saved"
ThreadText: # CiviMail error: "Sorry an error occurred and your information was not saved"
  
  (Asked by: username_0 on 2018-11-05)
  
  CiviCRM 5.6.1, WordPress 4.9.8, PHP 7.1.22, MySQL 5.7.23, WordFence 7.1.16
  
  I just started getting this error when trying to create a mailing. It happens with Mosaico and traditional mailings. I previously saw this issue when first using the WordFence security plugin and found a discussion here suggesting to disable WordFence's XSS check, which I did with success until now. That was months ago. The option is still disabled and I even tried disabling WordFence entirely, but no luck. I haven't made any significant changes recently that I can think of. I had no problems with my last weekly mailing.
  
  I also checked with my hosting provider to see if they had made any mod\_security rules changes. They hadn't. I don't see anything interesting in the logs. Any ideas?
  
  **Tags:** wordpress, civimail, mosaico
  
  > **Comments:**
  > **username_0**: I am also seeing this error on my personal dev box. It's just a linux box in my closet, not hosted. It has basically the same configuration, minus the WordFence plugin.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-11-24. Score: 6
  
  I have seen this error occur on WordPress due to a false positive generated in WordFence security plugin.
  
  If that might be your issue, put WordFence Firewall back into "Learning Mode", try saving/testing a Mosaico template email again in Civi and - if that is the problem - then WordFence should Whitelist the action, and the error should disappear.
  
  > **Comments:**
  > **username_2**: This worked for me. Thanks.  
  > **username_3**: Helped me too, though a colleague later said " just try saving the mailing then go into wordfence find the relevant request and whitelist it. That way you are not disabling the functionality while it learns."  
  > **username_4**: There are some more detail instructions here: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/230#issuecomment-366775357  
  
  ---
  
  ### Answer by username_5 on 2018-11-06. Score: 4
  
  I've run into this error for three reasons:
  
  1: I copied and pasted in text and there was a special character in there that CiviCRM did not like. I figured out which one it was by pasting in only pieces of the text and watching to see when it quit saving and instead gave me the error.
  
  2: I'd upgraded CiviCRM and the permissions weren't correct on some files (I'm logged in as root and therefore have to change owner/group when I upload).
  
  3: A modsecurity issue. My host was able to look at the logs and whitelist the URI that was causing the issue. Last time it was: /civicrm/ajax/rest
  
  > **Comments:**
  > **username_0**: Aha! This definitely helped....  I was failing with new, blank (no template) mailings, so I didn't think it could be #1.   I hadn't upgraded since my most recent successful mailing, so I didn't think it could be #2.   My dev box doesn't use mod_security, so I didn't think it was #3, but your mention of "/civicrm/ajax/rest" reminded me that I had applied a small patch for REST.php that was provided by the developers of CiviMobileAPI as a proposed fix for a login issue on WordPress. I offered to test it a few days ago and I apparently forgot to revert! That was it. Thanks!  
  > **username_5**: Yay! Glad to hear that I at least got your mind thinking in the right direction. Sometimes that's all it takes. :D  
  
  ---
  
  ### Answer by username_6 on 2019-03-27. Score: 2
  
  I had this issue too and the solution was a twist on username_5's [answer](https://civicrm.stackexchange.com/a/27205/75) so I'll elaborate in case anyone else runs into it.
  
  The specific thing that fixed it for me was granting user & group execute permissions on the wordpress file wp-admin/admin.php.
  
  I was getting a 403 forbidden error in the JS console on this file any time CiviCRM tried to take some kind of ajax action because it was trying to post to /civicrm/ajax/rest through admin.php but didn't have the right permissions.
  
  > **Comments:**
  > **username_7**: Welcome to CiviCRM.SE. The number next to a question or answer does not indicate its sequence, but the number of votes it has received; I have altered the reference in your post as a result. This is not a discussion forum, but a Q&A site, and if you are new to Stack Exchange, I would strongly recommend you take the site [tour] and review the [help].  
  > **username_6**: thanks @username_7 :)  
  > **username_8**: I still have this issue on WordPress the error I'm getting in the chrome console is "POST https://www.example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/ajax/rest 500"jquery.min.js?r=p6mna:4  Anyone know what this can be? or how to fix it?  
  
  ---
  
  