Answers.Body: <p>@Pradeep Nayak was right the issue was still the templates directory.  In my case the <a href="https://civicrm.org/extensions/mosaico-and-mailing-configuration-changes" rel="nofollow noreferrer">Mosaico and Mailing Configuration Changes</a> 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.</p>
  <p>Follow the directions with the configuration changes module and this becomes a simple fix.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-26T03:12:28.593Z
Answers.Text: Make sure there are not rows without metadata in civicrm_mosaico_template.  This will cause templates not to display.
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-14T19:07:21.457Z
Answers.LastActivityDate: 2024-07-14T19:07:21.457Z
Answers.UserDisplayName: Steve
Body: <p>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.</p>
  <p>I have tried multiple approaches to make it work. Most recently I found the <a href="https://civicrm.org/extensions/mosaico-and-mailing-configuration-changes" rel="nofollow noreferrer">Mosaico and Mailing Configuration Changes</a> that should change the hard coded URLs in the database.   When I look at a mailing draft this is all that comes up.</p>
  <p><a href="https://i.sstatic.net/YPajF8x7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YPajF8x7.png" alt="Mosaico thumbnail missing picture" /></a></p>
  <p>If I hit the edit button I get this JavaScript error in the console.</p>
  <pre><code>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: {}'
  </code></pre>
  <p><a href="https://i.sstatic.net/DD3fWh4E.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DD3fWh4E.png" alt="JavaScript error from the console repeated from above" /></a></p>
  <p>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.
  <a href="https://i.sstatic.net/AI5NAH8J.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AI5NAH8J.png" alt="Mosaico reinstall but editor button not found" /></a></p>
  <p>Any help in getting Mosaico to work is greatly appreciated.</p>
  <p>Thanks,
  Steve</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-08T09:30:29.733Z
Comments.Text: looks like the template path issue
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-14T19:03:55.430Z
Comments.Text: I figured out there were two different template directories depending on the template and I fixed it. Thanks!
Comments.UserDisplayName: Steve
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-14T20:25:03.547Z
Comments.Text: @Pradeep Nayak, I spoke to soon, shoot, I can edit the templates but I cannot start a new mailing.  https://crm.chasethemusic.org/sites/default/files/CiviCRM_Mosaico_Editor_Working.png.  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!
Comments.UserDisplayName: Steve
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-26T03:12:53.267Z
Comments.Text: See my comment to the answer.  This has been solved by deleting rows out of civicrm_mosaico_template without metadata.
Comments.UserDisplayName: Steve
Tags: <civimail><drupal><mosaico><drupal-9><mail>
Title: Cannot Work With Mosaico After Moving Site
ThreadText: # Cannot Work With Mosaico After Moving Site
  
  (Asked by: username_0 on 2024-07-07)
  
  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.
  
  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: {}'
  
  
  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.
  
  Any help in getting Mosaico to work is greatly appreciated.
  Thanks,
  username_0
  
  **Tags:** civimail, drupal, mosaico, drupal-9, mail
  
  > **Comments:**
  > **username_1**: looks like the template path issue  
  > **username_0**: I figured out there were two different template directories depending on the template and I fixed it. Thanks!  
  > **username_0**: @username_1, I spoke to soon, shoot, I can edit the templates but I cannot start a new mailing.  https://crm.chasethemusic.org/sites/default/files/CiviCRM_Mosaico_Editor_Working.png.  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!  
  > **username_0**: See my comment to the answer.  This has been solved by deleting rows out of civicrm_mosaico_template without metadata.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-07-14. Score: 2
  
  @username_1 was right the issue was still the templates directory. In my case the [Mosaico and Mailing Configuration Changes](https://civicrm.org/extensions/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.
  
  > **Comments:**
  > **username_0**: Make sure there are not rows without metadata in civicrm_mosaico_template.  This will cause templates not to display.  
  
  ---
  
  