1

This weekend I migrated my site from one server to another. The htdocs remained the same, just the infrastructure was upgraded. I backed up my sql database and files and restored them in the new location. No paths locally or via the internet changed. Only the IP address of the server. PHP and MySQL were upgraded but only by point releases (ie. 7.3 and 8.0 were the core).

After the migration it seems that I cannot create any new mailings in Mosaico using the versafix-1 template nor can I reuse existing emails based on this template. What is weird is I can use the template tedc15 and tutorial. When I select versafix-1 it goes to a blank grey screen.

Console errors:

TODO error!!! Trying to set a new default value for bodyTheme longTextStyle.linksColor while it already exists (current: #3f3f3f, new: #ccc)

declarations.js:130 Model ensure path failed undefined name -ko-color value @longTextStyle.linksColor default #ccc element undefined

parser.js:403 Exception while parsing the template Exception parsing expression @longTextStyle.linksColor TypeError: Cannot read property 'longTextStyle.linksColor' of undefined 

parser.js:403 Uncaught Exception parsing expression @longTextStyle.linksColor TypeError: Cannot read property 'longTextStyle.linksColor' of undefined

admin.php?page=CiviCRM&q=civicrm/mosaico/iframe&snippet=1:1 Uncaught ReferenceError: pagespeed is not defined
    at HTMLImageElement.onload (admin.php?page=CiviCRM&q=civicrm/mosaico/iframe&snippet=1:1)

Here's what I've done to troubleshoot:

Reinstalled Mosaico:

  • Uninstalled Mosaico
  • Deleted the Mosaico directory from the ext folder of my server
  • Downloaded a fresh copy of Mosaico from the CiviCRM website
  • Installed Mosaico

Upgraded to the latest version of ImageMagick (also made sure the extension was not commented out)

Verified file permissions (I actually set everything to 777 inside the wp-content/uploads/civicrm directory for testing)

Disabled Asset Caching

Verified Resource URLs and Directories (both set to [civicrm.files]/ext/)

Can anyone help shed some light on what's going on here?

Many thanks for your help!

4
  • I was going to say this may suggest you have old urls in the db but you are saying the path did not change - and you say you checked Resource URLs so there go my suggestions.
    – petednz - fuzion
    Nov 15, 2020 at 19:04
  • and sounds like you have checked everything here (just as you are on WP perhaps it relates to path changes?) civicrm.stackexchange.com/a/37585/96
    – petednz - fuzion
    Nov 15, 2020 at 19:06
  • 1
    hi @petednz-fuzion. Thanks for the suggestions. I'm currently looking into this as a fix. I'm not sure what they mean by PHP Backend but it sounds like it fixes the symptoms that I'm experiencing. I will try it and report back. github.com/markalston/mosaico-php-backend Nov 15, 2020 at 19:45
  • I also applied github.com/markalston/mosaico-php-backend on my plesk ubuntu server. Is there a better solution for the blank screen for drupal/civicrm ?
    – Rar9
    Nov 2, 2021 at 17:17

2 Answers 2

2

For reasons that I am still unsure of, I needed to apply the mosaico-php-backend script located here: https://github.com/markalston/mosaico-php-backend

I did change operating environments from Ubuntu to Debian so something on the backend may have been different but regardless, applying this script fixed my issue.

1

Came across this question when looking for the same problem. For me, the answer was to directly change the metadata for the template in the database. It is found in civicrm_mosaico_template.

I can't see why the metadata needs to include the full URL rather than a more portable relative path!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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