1

Occasionally, we get a warning "Mailing has not been saved, Content maybe out of date, please refresh the page and try again" when trying to save a Mosaico mailing." The mailing does not save and any changes are lost. When this happens, it seems to happen for everyone and every mailing. This also prevents a test email from being sent, presumably because the mailing can't be saved.

Cleanup caches seems to fix this problem, but not before whatever changes the user has inputted are lost and hair is torn out, tears are shed, etc.

Nothing is logged when this happens. I have been seeing this for quite a while, at least since 4.X. Here is a past question about what sounds like a similar issue.

Is there anything to be done to fix avoid this in the future? Anyone have any idea what the problem may be?

4
  • This seems to arise when you open a mailing on 2 different windows and save second before saving the first one. or Eg Contact A opens mailing M1, the same mailing is opened by Contact B on a different computer/window. Now when contact A tries to save the mailing, as it is already opened by contact B, you get the above error. Nov 13 '20 at 2:46
  • I've seen that happen sometimes. But it also is definitely happening when only open in one window.
    – Lars SG
    Nov 13 '20 at 4:53
  • I also occasionally see this warning: We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance. Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is example.org, but some users are accessing the page via example.org [..]. Error type: Could not find a valid session key.
    – Lars SG
    Nov 20 '20 at 23:45
  • Just in case the two issues may be related
    – Lars SG
    Nov 20 '20 at 23:46
1

Because mosaico uses the new-ish afform form tools (i.e. an integration of AngularJS), it means that a lot of the communication from the form to the server is happening via ajax. When that back-channel communication fails, that's when you get that message.

Possible reasons for the failure include:

  1. The same form open in a different window (leading to invalid state data being sent to the server).
  2. A network problem between your window and the server.
  3. A server error due to a bug.
  4. A server non-response due to a delay.

Your solution will depend on diagnosing which of these is going on, using:

  1. Your browser developer tools network tab and console.
  2. Your civicrm, CMS and server logs.

A lot of the time, you may get that message without it meaning anything terrible and it can be ignored, but usually you want to try an explicit save at that point and then check the civicrm server logs for errors.

For example, I have a client out in the country using a satellite-based ISP, and she regularly has this issue - not much to do except wait for the cloud to stop blocking the satellite ...

3
  • Thanks Alan. I definitely see what you're talking about sometimes, but I think there's also something more significant happening, when no one can save any mailings. Recently, we had a case where multiple people in multiple different locations were unable to save their mailings—until I cleared the cache (in CiviCRM) and then it seemed to work for everyone. I'm guessing that's the kind of thing that needs further investigation, so I'll try to dig in deeper next time it happens, unless you have any suggestions for that now.
    – Lars SG
    Dec 16 '20 at 18:35
  • So that rules out 2. and maybe 1. Sounds like in your case it could be a database lock or race condition issue of some kind. If you send me the timing (exactly when you cleared the cache, and approx how long before that it started hapenning), I can look at your logs.
    – Alan Dixon
    Dec 16 '20 at 22:41
  • Thanks, I'll let you know next time it happens. The last time this happened to everyone was more than a month ago.
    – Lars SG
    Dec 17 '20 at 3:19
0

In my case the reason was an emoticon in one of the content blocks – after removing it the error disappeared. The well known reason is database encoding and described eslewhere, e.g. here or here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.