<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>

CC BY-SA 4.0
2022-04-08T18:07:52.700Z
2022-04-08T18:07:52.700Z
artmem
<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>

CC BY-SA 4.0
2022-04-07T10:22:24.527Z
Please post the relevant parts of the template that's rendering the matrix blocks, It's likely related to this issue.
MoritzLost
CC BY-SA 4.0
2022-04-08T07:09:24.627Z
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.
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2022-04-08T18:05:55.817Z
@MatsMikkelRummelhoff that was it. Thank you!
artmem
<matrix><live-preview>
Matrix content disappears in Live Preview when updated
# 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**: @MatsMikkelRummelhoff 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.


---

