• Since I updated my sites to the latest version, stray paragraph tages have started to appear, before and after paragraphs. This is on all sites that have been updated to the latest version. Anyone got any ideas?

    <p><!– /wp:paragraph –></p>
    <p><!– /wp:paragraph –></p>

    <p>Some Legitimate paragraph.</p>

    <p><!– /wp:paragraph –></p>
    <p><!– /wp:paragraph –></p>

    I doubt if it can be the editor as this is happening even on pages not edited for a while, including pages created with a page builder. It is also the case on a brand new install, irrespective of theme.

    Thanks
    Derek

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi, @dkeats

    Indeed 5.7 introduced a change that gives empty paragraphs height, in order to replicate as much as possible the result in the editor with the result in the front page.

    If you don’t like this behavior, try adding this in Dashboard – Appereance – Customize – Additional CSS in the Customizer

    body p:empty:before {
        content: none;
    }

    Hope this helps,
    Kind regards!

    Thread Starter dkeats

    (@dkeats)

    Ah, I put that code in the wrong place.
    Now it works. But it still sucks that something so insane gets into a released version of WP!

    • This reply was modified 5 years, 2 months ago by dkeats.

    Thanks, that doesn’t seem to do anything.

    Did you clear cache (browser + any cache plugin)?

    Is there any way to add code to remove those <p><!– /wp:paragraph –></p> tags before display?

    Those paragraphs were not added now. They were there before, but not displayed.

    For more information see this topic here: https://ww.wp.xz.cn/support/topic/empty-spaces-after-wordpress-5-7-update/#post-14163553

    Kind regards!

    Thread Starter dkeats

    (@dkeats)

    https://learnthebirds.com/event/urban-raptors/

    But how would something like this get into any reasonably formatted HTML? Using empty paragraphs for spacing like this surely is not good HTML practices. Then it must be the editor that is broken.

    <p><!– /wp:paragraph –></p>
    <p><!– wp:shortcode –><br />

    Now it works.

    I’m glad it works now! 😊 I understand such a feature behaviour can be frustrating and things are discussed in the Editor Team to find a better solution. We are all volunteers developing WordPress and sometimes even if we have the best intentions, things like this can happen. Luckily there is a quick solution to this.

    Thread Starter dkeats

    (@dkeats)

    It is not a feature, don’t call it that please. Anything that uses HTML for spacing is a bug not a feature, and whatever put the code there is broken, and whoever decided to “FIX” it created a massive mess.

    I would rather run an old version of WordPress and never have another update than have to deal with great new features that are so ill considered.

    I am sorry you feel that way. I understand your position. My guess is that it was intended as a feature, but for sure the delivery is problematic. I had to add the additional CSS code myself in some of the websites I manage, where empty paragraphs were present, so I get where you come from. It can be frustrating.

    Now, that the problem is solved, you can enjoy the other many nice things that came in 5.7

    Kind regards!

    Thread Starter dkeats

    (@dkeats)

    Hehe, yea, but it is not really solved. It is hidden. I would prefer it if those codes were not inserted in the first place. That is the real bug.

    But thanks for your help. It is appreciated.

    Thread Starter dkeats

    (@dkeats)

    I have dug into this some more, and this is definitely a bug in the editor. How does one report bugs in the editor?

    This issue has been reported here: https://core.trac.ww.wp.xz.cn/ticket/52771

    Thread Starter dkeats

    (@dkeats)

    THanks, though I think this is a different bug, they are all brought to light by the change to CSS. The one I see is the BLOCK EDITOR inserting bad HTML like…

    <p><!– /wp:paragraph –></p>
    <p><!– wp:shortcode –><br />

    and doing this even when the user has not pressed enter or shift enter.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Empty paragraphs inserted after last update’ is closed to new replies.