0

I recently moved a WordPress CiviCRM install to Drupal 9. Overall it is working well. The biggest concern I have right now is that I cannot get Mosaico to work again.

I have tried multiple approaches to make it work. Most recently I found the Mosaico and Mailing Configuration Changes that should change the hard coded URLs in the database. When I look at a mailing draft this is all that comes up.

Mosaico thumbnail missing picture

If I hit the edit button I get this JavaScript error in the console.

TypeError: Cannot read properties of undefined (reading 'title')
at filterTemplate (angular-modules.60e5f3e3b5307d61d538d0d0c914694c.js:4023:20)
at Yt (lodash.min.js:10:252)
at Function.Ce (lodash.min.js:38:58)
at angular-modules.60e5f3e3b5307d61d538d0d0c914694c.js:4042:28
at angular.min.js?r=WZDNuen_US:141:454
at m.$digest (angular.min.js?r=WZDNuen_US:153:67)
at angular.min.js?r=WZDNuen_US:156:267
at Yg.completeTask (angular.min.js?r=WZDNuen_US:168:231)
at angular.min.js?r=WZDNuen_US:52:229 'Possibly unhandled rejection: {}'

JavaScript error from the console repeated from above

I tried uninstalling the extension and reinstalling it to start from scratch (which I would rather not have to do) and the editing interface does not come up at all. Mosaico reinstall but editor button not found

Any help in getting Mosaico to work is greatly appreciated.

Thanks, Steve

4
  • looks like the template path issue Commented Jul 8 at 9:30
  • I figured out there were two different template directories depending on the template and I fixed it. Thanks!
    – Steve
    Commented Jul 14 at 19:03
  • @Pradeep Nayak, I spoke to soon, shoot, I can edit the templates but I cannot start a new mailing. crm.chasethemusic.org/sites/default/files/…. I have tested all my templates and they appear to be editable like the one in the screenshot above. I just cannot use them for a mailing. The error appears the same as before when trying to create a new mailing. I appreciate any help!
    – Steve
    Commented Jul 14 at 20:25
  • See my comment to the answer. This has been solved by deleting rows out of civicrm_mosaico_template without metadata.
    – Steve
    Commented Aug 26 at 3:12

1 Answer 1

2

@Pradeep Nayak was right the issue was still the templates directory. In my case the Mosaico and Mailing Configuration Changes extension was working. I just had multiple paths for templates in the database. You can find this by looking at the metadata column of the civicrm_mosaico_template table.

Follow the directions with the configuration changes module and this becomes a simple fix.

1
  • Make sure there are not rows without metadata in civicrm_mosaico_template. This will cause templates not to display.
    – Steve
    Commented Aug 26 at 3:12

Your Answer

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

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