Post Content Disappearing
-
On three different occasions on the past two months, the content of a blog post I’ve made has mysteriously disappeared after posting, leaving only the title behind. In each case, the posts used nothing more complicated than an image with text and were identical in style to many other posts I’ve made successfully. In the most recent case, re-copying the missing content from a back-up just results in a repeat of the problem. The revisions log showed that all of the content was deleted, as if I had made a mass correction. No one else should have editing rights for this blog, so I have no idea what’s going on here.
The blog I need help with is: (visible only to logged in users)
-
Hi @theronm4, that’s awfully strange, sorry to hear it!
Is there any chance you’re editing the content in multiple places at once, like in more than one browser tab, or using a browser in addition to an app?
And just to clarify, the revisions do show the full content as well as a removal?
Thanks in advance for any further context you can provide!
-
The revisions do show the full content being added, then deleted, with the deletion coming immediately on publication based on the time stamp. (In the pic below, from a problem case a couple of weeks ago, the publication time was 11/5/23 at 2:11 PM)
A few minutes ago, I tried posting a copy of my most recent problem case again, being careful to make sure that no version of it was open in any other window (I’m doing this all through the browser), and I got the same result: all but the title immediately deleted. However, I was able to make another, much shorter blog post earlier today on an unrelated topic with no problem.
Could there be something about the way the blog post is structured that’s causing this? I have used the browser to post blogs for two full years prior to now without any problem like this, and I don’t think I am doing anything different now.
-
Hmm, that’s a curious idea. Are you adding any special blocks or formatting to these posts?
Also, what browser are you using, and do you encounter the same problem if you post the same thing using another browser?
And, are you able to restore the good revisions?
-
Doesn’t seem to be a browser issue. I tried it in both Firefox and Chrome and the same thing happened.
I did some further testing and discovered that the problem was linked to a couple of certain images; if either was included, the post blanked out. If they weren’t included, things were fine. On additional testing, I discovered that the problem was that the images in question had accidentally been posted in a H4 Header block, and apparently WordPress doesn’t like that. I now assume that was the same problem in the other two cases.
-
Oh wow! Thank you for that additional information. Were you using a pattern when that happened, or can you share how you ended up with images in header blocks? I’ll get a bug report filed. Regardless, ideally it would just show an error rather than blanking out like that.
-
Wasn’t using a pattern. Think I just copy-pasted the image in before making sure I had shifted to a new block.
-
-
Hey @theronm4, is there any chance you can share how you got an image in the heading? I’ve been trying to duplicate this to file a bug.
- I couldn’t insert one with the toolbar
- I tried making a new line with shift enter and typing /image – no luck
- I tried using the block inserter and it added an image on its own line
- I tried pasting an image there and it made its own block too
If you can send more context so we can duplicate this, we’ll get it filed. Thanks!
-
It can be done using the code editor by just putting the <img src=> command inside a header section. I just tested the following code and got the auto-delete-everything result when I published it:
<!– wp:heading {“level”:4} –>
<h4 class=”wp-block-heading”>Header<img src=”https://usaanime.files.wordpress.com/2023/11/image-35.png?w=1024″ alt=”” class=”wp-image-4267″> </h4><!– /wp:heading –>
Now, how you can get the <img src> to slide into the header using the visual editor? I don’t know, but clearly it’s possible somehow. Maybe something similar to how you can accidentally get bold setting locked on in text editing if you mis-key something when using cntrl-B? I can tell you that you know you have this situation when there’s no space between the header and the image, such as seen below:

-
Hey there,
Thanks for this information, so it doesn’t look like this code
<!– wp:heading {“level”:4} –>
<h4 class=”wp-block-heading”>Header<img src=”https://usaanime.files.wordpress.com/2023/11/image-35.png?w=1024″ alt=”” class=”wp-image-4267″> </h4><!– /wp:heading –>
Would work quite correctly, mainly because it breaks the heading/header into two with the image.
This would probably stop the behaviour you’re having:
<!– wp:heading {“level”:4} –>
<h4 class=”wp-block-heading”>Header</h4><!– /wp:heading –>
IMG…etcWith regards to, “Now, how you can get the <img src> to slide into the header using the visual editor?” can you provide an example of what you’re looking to achieve, it may be a case of using CSS to make that slide in.
Many thanks in advance!
-
The point with the provided code is that it DOES cause a major problem – i.e., wiping out the whole post when you try to publish it.
And I wasn’t trying to accomplish anything beyond just normally posting an image below a header using the visual editor. It somehow has happened purely accidentally on at least four occasions now, resulting in three posts (one long post had the problem in two different places) having all their content deleted on publication. (And only on publication; things show normally in draft mode prior to publication.)
Now that I know what’s going on, I’m going to be careful in the future to make sure that I have a new block started before posting an image. However, that this even can happen using the visual editor is a bit of a concern.
- The topic ‘Post Content Disappearing’ is closed to new replies.