Site logo

[Support request] Suddenly empty paragraphs appearing

Home Forums Support [Support request] Suddenly empty paragraphs appearing

Home Forums Support Suddenly empty paragraphs appearing

  • This topic has 3 replies, 3 voices, and was last updated 5 years ago by Ying.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1696328
    Dominik

    Hi,

    I have a problem with some empty paragraphs that are suddenly appearing beneath random blocks. 2 different web-projects – same issue.
    For example from one minute to the other the footer has a bottom spacing – inspect reveals that it’s an empty paragraph. My workaround is to delete it manually but with bigger projects it’s not possible. I edit the block, type something into the empty paragraph to bring up the menu and then delete it.

    empty paragraph

    The issue really appears randomly during workflow since maybe 1 week.

    On the other project I was adding translations and after saving them, suddenly all languages have the paragraph beneath the woocommerce short description (the text is inserted via shortlink).

    The paragraph gets its CSS from /wp-includes/css/dist/block-library/style.min.css?ver=5.7

    Thanks
    Manuel

    #1696634
    Elvin
    Staff
    Customer Support

    Hi there,

    I understand how frustrating this is but these empty paragraphs are user-added paragraph blocks. (usually unintended)

    When you create any content(page, post, block element) through the Block Editor(Gutenberg), if you click on an empty space in the content area outside of a container block, the editor automatically creates a paragraph block even if you didn’t type anything in it. This is a normal occurrence you should watch out for.

    You’ll normally see a placeholder text saying Start writing or type / to choose a block after unselecting this empty paragraph block.

    It’s not exactly a CSS issue, but rather, a Gutenberg issue. And the best practice, while it’s tedious, is to make sure you have this removed. If you use a reusable block, make sure the reusable block doesn’t have stray/empty paragraph blocks.

    While you can attempt to fix this with CSS –

    .woocommerce-product-details__short-description p:before {
        display: none;
    }

    – that’s not good housekeeping as you’re basically leaving these stray/empty paragraphs alone, potentially causing “excessive dom size” flags when you test for performance.

    #1696846
    Dominik

    The thing is I didn’t touch these blocks. I must have touched every single short description in every language (ca. 300 blocks). I didn’t touch the footer or any other block where the paragraph appeared. It suddenly appears… Sometimes even twice. I delete the paragraph and a few days later the paragraph shows again.

    I just found out that WPML could be the source of this problem. Here they mentioned that remove_filter(‘the_content’, ‘wpautop’); might solve the problem.

    It does but not 100%. Some of the <p> are still here.

    #1697603
    Ying
    Staff
    Customer Support

    Hi Manuel,

    Thanks for sharing us with this information.

    We haven’t received similar reports before, so we assume it’s not GP issue.

    Glad you figured it might be the translation plugin, hope they can provide a better solution for you, it seems a lot of work to manually delete the p block.

    Let us know if there’s anything we could help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.