[Support request] Strange Problem in Section

Home Forums Support [Support request] Strange Problem in Section

Home Forums Support Strange Problem in Section

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #986472
    Sonja

    Hello,

    in this section, there is this > symbol just above the table. But in the section, there is no such an symbol. Even in Sourcecode, I can not see this.

    I always work in posts, pages, section in the text editor, so i had to see such an symbol. But there simply is no.

    I thought, that there is maybe a problem with the table, e.g. an missing bracket, but i have tripple check the table code and can not find a problem.

    Before, this table was in a post. without problem. Then I copied the Table in a section and know I have this problem.

    What can that be?

    #986668
    David
    Staff
    Customer Support

    Hi there,

    weird – if you can’t find a fault with the Table HTML then its probably WP messing with the way the shortcode is being output from the sections editor – ie inserting an AutoP.

    You can simply hide it if you can’t find the issue with this CSS:

    .su-table > p:first-child {
        display: none;
    }
    #986711
    Sonja

    Hmm, do sections handle thinks in a different way, then posts and pages?

    By the way, the table was build with the shortcode ultimate plugin, which i use on all of my sites and for many years without any problem.

    #986713
    Sonja

    Now i have insert the exact code from the section in a test site. And there is the same problem. That is really strange. So this can´t be a section problem, right?

    #986719
    Sonja

    Now I have copied on a test site, the first rows of this table. And there is no such a symbol, everything is fine.

    But on the original table, which i also have copied on the test site, there is this symbol. I don´t get it. Am i crazy?

    #986730
    David
    Staff
    Customer Support

    Sections uses the Classic Editor – before WP 5 – all things were fine, then it started adding autoP to some shortcode content.

    You can test to see if it is an AutoP problem by adding this PHP snippet to your child theme functions.php or via the Code Snippets plugin:

    remove_filter( 'the_content', 'wpautop' );

    If the problem is still there afterwards then i would suggest there is some broken HTML in your table.

    #986739
    Sonja

    What is this autoP, you mentioned?

    #986743
    Sonja

    If i add this code in functions child theme, then i get this error:

    Warning: Use of undefined constant ‘the_content’ – assumed ‘‘the_content’’ (this will throw an Error in a future version of PHP) in /www/htdocs/xxx/xxx/wp-content/themes/generatepress_child/functions.php on line 9

    #986744
    Sonja

    And also i have insertet the table in a normal test page, and get the error too.

    #986746
    David
    Staff
    Customer Support

    i edited the code above – there were some funky characters in there.

    AutoP is a function built into WordPress that automatically inserts Paragraph tags around certain types of content.

    #986749
    Sonja

    I have tested this code. The result was, that the symbol was still there, but without the space above and beneath. It removes the word wrap. it seems.

    #986752
    David
    Staff
    Customer Support

    So it sounds like there is some broken HTML either in the table or before it.

    #986756
    Sonja

    But there is no.

    I have copied the first rows of this exact table in another place, and get no error.

    It is just this table, where i get this problemes?Can it be, that there is a database problem or so?

    #986854
    Tom
    Lead Developer
    Lead Developer

    It’s possible that the shortcode is outputting some HTML that Sections is stripping. Since WP 5.0, the TinyMCE editor acts a little different than it used to.

    Did you try the CSS David provided here?: https://generatepress.com/forums/topic/strange-problem-in-section/#post-986668

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