<p>The content reversion issue was reported during the production deployment of a new module on the Craft CMS site.</p>
<p>To address this issue, we suspect the below deployment scripts are causing the content reversion problem. So, we manually executed these deployment scripts on the staging server including the following:
<strong>./craft migrate/all
./craft project-config/apply
./craft clear-caches/data
./craft project-config/rebuild</strong></p>
<p>During this investigation, we were able to replicate the content reversion issue specifically while running the <strong>php craft project-config/apply</strong> command in the terminal. Below is the screenshot for your reference,
<a href="https://i.sstatic.net/s0ys7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/s0ys7.png" alt="enter image description here" /></a></p>
<p>Therefore, we suspect that there might be an inherent glitch within the Craft CMS. Below are the Application &amp; server details of the site, please help us to understand the issue better and to avoid this kind of issue in the future.</p>
<ol>
<li>PHP version 8.2.10</li>
<li>OS version  Linux 5.15.0-1044-aws</li>
<li>Database driver &amp; version   MySQL 5.7.42</li>
<li>Craft edition &amp; version Craft Pro 4.5.3</li>
</ol>
<p><a href="https://i.sstatic.net/Mmppp.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Mmppp.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-09-19T13:37:35.787Z
Your screenshot is unreadable, so kinda pointless. Beyond that, what is your question? “The content revison issue…” wth does that mean?
Seth Warburton
CC BY-SA 4.0
2023-09-19T13:55:14.277Z
I think he means that when running `php craft project-config/apply` the matrixBlockType was removed unexpectedly
moztech
CC BY-SA 4.0
2023-09-19T14:29:56.317Z
Yes, correct, this script php craft project-config/apply is added into the codecommit deployment and whenever this script runs during the deployment the recent content changes have been reverted.
JohnC
CC BY-SA 4.0
2023-09-21T11:14:56.303Z
I don't see the issue. You removed a field, pushed project config changes to your server and then ran project-config/apply so the field was removed. If you didn't intend that field to be removed then you should revert the changes to project config that removed that field.
Seth Warburton
<craft4><deployment><content>
Content revision issue for every code deployment
# Content revision issue for every code deployment

(Asked by: username_0 on 2023-09-19)

The content reversion issue was reported during the production deployment of a new module on the Craft CMS site.

To address this issue, we suspect the below deployment scripts are causing the content reversion problem. So, we manually executed these deployment scripts on the staging server including the following:
**./craft migrate/all
./craft project-config/apply
./craft clear-caches/data
./craft project-config/rebuild**

During this investigation, we were able to replicate the content reversion issue specifically while running the **php craft project-config/apply** command in the terminal. Below is the screenshot for your reference,
[![enter image description here](https://i.sstatic.net/s0ys7.png)](https://i.sstatic.net/s0ys7.png)

Therefore, we suspect that there might be an inherent glitch within the Craft CMS. Below are the Application & server details of the site, please help us to understand the issue better and to avoid this kind of issue in the future.

1. PHP version 8.2.10
2. OS version Linux 5.15.0-1044-aws
3. Database driver & version MySQL 5.7.42
4. Craft edition & version Craft Pro 4.5.3

[![enter image description here](https://i.sstatic.net/Mmppp.jpg)](https://i.sstatic.net/Mmppp.jpg)

**Tags:** craft4, deployment, content

> **Comments:**
> **username_1**: Your screenshot is unreadable, so kinda pointless. Beyond that, what is your question? “The content revison issue…” wth does that mean?  
> **username_2**: I think he means that when running `php craft project-config/apply` the matrixBlockType was removed unexpectedly  
> **username_0**: Yes, correct, this script php craft project-config/apply is added into the codecommit deployment and whenever this script runs during the deployment the recent content changes have been reverted.  
> **username_1**: I don't see the issue. You removed a field, pushed project config changes to your server and then ran project-config/apply so the field was removed. If you didn't intend that field to be removed then you should revert the changes to project config that removed that field.  

---

## 0 answers

