Answers.Body: <p>Turned out to be related to [this issue].<a href="https://github.com/craftcms/cms/issues/6902" rel="nofollow noreferrer">1</a></p>
  <p>In my SEOMatic Content SEO I was setting an image from a matrix block. Changing object.entry.myMatrixField.type... to clone(object.entry.myMatrixField.type... fixed it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-08T18:07:52.700Z
Answers.LastActivityDate: 2022-04-08T18:07:52.700Z
Answers.UserDisplayName: artmem
Body: <p>I'm having an issue where, if I edit any matrix content in Live Preview, all matrix content disappears.</p>
  <p>When I first open preview, any existing matrix content will display properly, but as soon as I add a new block, or edit the contents of an existing block, all matrix content gets removed from the preview.</p>
  <p>This also happens when I edit matrix content before opening live preview -- when I open preview, all matrix content will be gone.</p>
  <p>Nothing is deleted from the editor, and when I save, the content remains and displays properly on the front end. It's only in preview where it's an issue.</p>
  <p>I'm running Craft 3.7.37, but I've also had the issue with previous versions.</p>
  <p>Here's the relevant part of the template:</p>
  <pre><code>        {% set content = entry.myMatrixField.all() %}
          {% for block in content %}
              {% include &quot;blocks/_&quot; ~ block.type ignore missing %}
          {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-07T10:22:24.527Z
Comments.Text: Please post the relevant parts of the template that's rendering the matrix blocks, It's likely related to this issue.
Comments.UserDisplayName: MoritzLost
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-08T07:09:24.627Z
Comments.Text: I suspect you're running into an issue similar to [this one](https://github.com/craftcms/cms/issues/6902), but it's impossible to help further without more details.
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-08T18:05:55.817Z
Comments.Text: @MatsMikkelRummelhoff that was it. Thank you!
Comments.UserDisplayName: artmem
Tags: <matrix><live-preview>
Title: Matrix content disappears in Live Preview when updated
ThreadText: # Matrix content disappears in Live Preview when updated
  
  (Asked by: username_0 on 2022-04-06)
  
  I'm having an issue where, if I edit any matrix content in Live Preview, all matrix content disappears.
  
  When I first open preview, any existing matrix content will display properly, but as soon as I add a new block, or edit the contents of an existing block, all matrix content gets removed from the preview.
  
  This also happens when I edit matrix content before opening live preview -- when I open preview, all matrix content will be gone.
  
  Nothing is deleted from the editor, and when I save, the content remains and displays properly on the front end. It's only in preview where it's an issue.
  
  I'm running Craft 3.7.37, but I've also had the issue with previous versions.
  
  Here's the relevant part of the template:
  
  ```
          {% set content = entry.myMatrixField.all() %}
          {% for block in content %}
              {% include "blocks/_" ~ block.type ignore missing %}
          {% endfor %}
  
  ```
  
  **Tags:** matrix, live-preview
  
  > **Comments:**
  > **username_1**: Please post the relevant parts of the template that's rendering the matrix blocks, It's likely related to this issue.  
  > **username_2**: I suspect you're running into an issue similar to [this one](https://github.com/craftcms/cms/issues/6902), but it's impossible to help further without more details.  
  > **username_0**: @username_2 that was it. Thank you!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-04-08. Score: 2
  
  Turned out to be related to [this issue].[1](https://github.com/craftcms/cms/issues/6902)
  
  In my SEOMatic Content SEO I was setting an image from a matrix block. Changing object.entry.myMatrixField.type... to clone(object.entry.myMatrixField.type... fixed it.
  
  
  ---
  
  